Re: [PATCH 00/28] Create a reference backend for packed refs
- From
Jeff King <peff@peff.net>
- Date
- Jun 19, 2017, 19:43 UTC
- Message-ID
- <20170619194315.tzdmo7xel2dztoju@sigill.intra.peff.net>
- In-Reply-To
- <xmqqvanrsru4.fsf@gitster.mtv.corp.google.com>
On Mon, Jun 19, 2017 at 12:25:07PM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: > > > Is the iterator over packed-refs correctly skipping over what are > > covered by loose refs? The entries in the packed-refs file that are > > superseded by loose refs should be allowed to point at an already > > expired object. > > Here it is in a test form for easier diagnosis.
Thanks, I was just starting to do that myself. The problem is in ca6b06eb7 (packed_ref_store: support iteration, 2017-05-15) and is pretty obvious: the packed_ref iterator checks whether the entry resolves.
I think that _neither_ of the loose and packed iterators should be checking this. It's only the merged result (where loose trumps packed) that should bother checking.
-Peff