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

[PATCH 0/2] peel-ref optimization fixes

From
Jeff King <peff@peff.net>
Date
Mar 16, 2013, 09:00 UTC
Message-ID
<20130316090018.GA26708@sigill.intra.peff.net>

These patches fix the issue with peel-ref noticed recently by Michael (namely that we fail to correctly peel packed refs outside of refs/tags). The problem has been there since we added peeling support to pack-refs, but traditionally "show-ref -d" was the only caller that actually triggered the issue. Between that and the fact that most people only put annotated tags into refs/tags, nobody really noticed.

Since my 435c833 (upload-pack: use peel_ref for ref advertisements, 2012-10-04), which is in v1.8.1, upload-pack can trigger the problem, too, but I haven't actually heard of any reports in the wild.

I split it into two patches; the first one is the minimal fix that makes git work properly going forward. The second one helps git be more robust when reading packed-refs files generated by older git (or other implementations). The second one depends semantically but not textually on the first one; if you're worried about that, they can be squashed.

  [1/2]: pack-refs: write peeled entry for non-tags
  [2/2]: pack-refs: add fully-peeled trait

I think Michael may be rewriting some of this code, but if we are going to go this direction with the fix (and I think we should), this is the change that should go to maint in the meantime.

-Peff
Next: Jeff King
Message 1 of 19 in “peel-ref optimization fixes”
  1. 0/2 peel-ref optimization fixesJeff King, Mar 16, 2013
  2. 1/2 pack-refs: write peeled entry for non-tagsJeff King, Mar 16, 2013
  3. Michael HaggertyMar 16, 2013
  4. Jeff KingMar 17, 2013
  5. 2/2 pack-refs: add fully-peeled traitJeff King, Mar 16, 2013
  6. Michael HaggertyMar 16, 2013
  7. Jeff KingMar 17, 2013
  8. Junio C HamanoMar 17, 2013
  9. Jeff KingMar 17, 2013
  10. 0/4 peel-ref optimization fixesJeff King, Mar 17, 2013
  11. 1/4 avoid segfaults on parse_object failureJeff King, Mar 17, 2013
  12. 2/4 use parse_object_or_die instead of die("bad object")Jeff King, Mar 17, 2013
  13. 3/4 pack-refs: write peeled entry for non-tagsJeff King, Mar 17, 2013
  14. 4/4 pack-refs: add fully-peeled traitJeff King, Mar 17, 2013
  15. Junio C HamanoMar 17, 2013
  16. 4/4 pack-refs: add fully-peeled traitJeff King, Mar 18, 2013
  17. Junio C HamanoMar 18, 2013
  18. Michael HaggertyMar 18, 2013
  19. Junio C HamanoMar 18, 2013

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.