From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id EE5CE1F66E for ; Tue, 25 Aug 2020 16:56:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726475AbgHYQ4p (ORCPT ); Tue, 25 Aug 2020 12:56:45 -0400 Received: from cloud.peff.net ([104.130.231.41]:40128 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726090AbgHYQ4o (ORCPT ); Tue, 25 Aug 2020 12:56:44 -0400 Received: (qmail 1059 invoked by uid 109); 25 Aug 2020 16:56:43 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Tue, 25 Aug 2020 16:56:43 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 29997 invoked by uid 111); 25 Aug 2020 16:56:42 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Tue, 25 Aug 2020 12:56:42 -0400 Authentication-Results: peff.net; auth=none Date: Tue, 25 Aug 2020 12:56:42 -0400 From: Jeff King To: Taylor Blau Cc: Derrick Stolee , git@vger.kernel.org, dstolee@microsoft.com Subject: Re: [PATCH] builtin/repack.c: invalidate MIDX only when necessary Message-ID: <20200825165642.GB1414394@coredump.intra.peff.net> References: <20200825022614.GA1391422@coredump.intra.peff.net> <20200825023710.GA98081@syl.lan> <20200825144146.GA7671@syl.lan> <6a34d7ee-8c6b-8c6c-93bd-0013dccccafb@gmail.com> <20200825154224.GA9116@syl.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200825154224.GA9116@syl.lan> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Tue, Aug 25, 2020 at 11:42:24AM -0400, Taylor Blau wrote: > > test_expect_success 'repack preserves multi-pack-index when deleting unknown packs' ' > > git init preserve && > > test_when_finished "rm -fr preserve" && > > ( > > cd preserve && > > midx=.git/objects/pack/multi-pack-index && > > > > test_commit 1 && > > HASH1=$(git pack-objects --all .git/objects/pack/pack) && > > touch .git/objects/pack/pack-$HASH1.keep && > > > > cat >pack-input <<-\EOF && > > Escaping the heredoc shouldn't be necessary, so this can be written > instead as '<<-EOF'. We usually go the opposite way: if a here-doc doesn't need interpolation, then we prefer to mark it as such to avoid surprising somebody who adds lines later (and might need quoting). Certainly you can argue that least-surprise would be in the other direction (i.e., people expect to interpolate by default, and you surprise anybody adding a variable reference), but for Git's test suite, the convention usually runs the other way. -Peff