From: Patrick Steinhardt Date: Wed, 11 Nov 2020 10:00:15 GMT Subject: Re: [PATCH v3 1/4] t1400: avoid touching refs on filesystem Message-ID: In-Reply-To: <20201111090454.GA4270@szeder.dev> On Wed, Nov 11, 2020 at 10:04:54AM +0100, SZEDER Gábor wrote: > On Wed, Nov 11, 2020 at 07:58:38AM +0100, Patrick Steinhardt wrote: > > The testcase t1400 exercises the git-update-ref(1) utility. To do so, > > many tests directly read and write references via the filesystem, > > assuming that we always use loose and/or packed references. While this > > is true now, it'll change with the introduction of the reftable backend. > > > > Convert those tests to use git-update-ref(1) and git-show-ref(1) where > > possible. As some tests exercise behaviour with broken references and > > neither of those tools actually allows writing or reading broken > > references, this commit doesn't adjust all tests. > > > > Signed-off-by: Patrick Steinhardt > > --- > > t/t1400-update-ref.sh | 72 +++++++++++++++++++++++-------------------- > > 1 file changed, 39 insertions(+), 33 deletions(-) > > > > diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh > > index 4c01e08551..d7a57488ed 100755 > > --- a/t/t1400-update-ref.sh > > +++ b/t/t1400-update-ref.sh > > > @@ -188,27 +194,26 @@ test_expect_success "move $m (by HEAD)" ' > > test $B = $(git show-ref -s --verify $m) > > ' > > test_expect_success "delete $m (by HEAD) should remove both packed and loose $m" ' > > - test_when_finished "rm -f .git/$m" && > > + test_when_finished "rm -f git update-ref -d $m" && > > There is a leftover 'rm -f' here. Oops, thanks a lot for catching. Funny that it still passed. Patrick