Re: [PATCH] refs: cleanup directories when deleting packed ref
- From
Jeff King <peff@peff.net>
- Date
- May 7, 2021, 22:02 UTC
- Message-ID
- <YJW46fsdKaUv2Fln@coredump.intra.peff.net>
- In-Reply-To
- <YJW3n6lVWVAuLQap@coredump.intra.peff.net>
On Fri, May 07, 2021 at 05:56:47PM -0400, Jeff King wrote:
Show 11 quoted lines
> > +test_expect_success 'directory not created deleting packed ref' ' > > + git branch d1/d2/r1 HEAD && > > + git pack-refs --all && > > + test_path_is_missing .git/refs/heads/d1/d2 && > > + git branch -d d1/d2/r1 && > > + test_path_is_missing .git/refs/heads/d1/d2 && > > + test_path_is_missing .git/refs/heads/d1 > > +' > > ...this test passes even without your patch applied. I wonder if there's > something else required to trigger the problem.
If I replace "git branch -d" with "git update-ref -d", then the problem does trigger (and your patch does indeed clear it up). I wonder what the difference is.
-Peff