git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Jeff KingNext: Jeff King
Message 3 of 12 in “refs: cleanup directories when deleting packed ref”
  1. refs: cleanup directories when deleting packed refWill Chandler, May 7, 2021
  2. Jeff KingMay 7, 2021
  3. Jeff KingMay 7, 2021
  4. Jeff KingMay 7, 2021
  5. Will ChandlerMay 8, 2021
  6. Will ChandlerMay 8, 2021
  7. Bagas SanjayaMay 8, 2021
  8. Junio C HamanoMay 8, 2021
  9. Will ChandlerMay 9, 2021
  10. Junio C HamanoMay 10, 2021
  11. Jeff KingMay 11, 2021
  12. Junio C HamanoMay 11, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.