Thread (13 messages) flat view 13 messages, 2 authors, 2016-06-15
STALE3733d

Revision v1 of 2 in this series.

Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 0/2] peel-ref optimization fixes

From: Jeff King <hidden>
Date: 2016-06-15 22:56:24

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help