From: Junio C Hamano Date: Fri, 23 Jun 2017 20:24:58 GMT Subject: Re: [PATCH v2 00/29] Create a reference backend for packed refs Message-ID: In-Reply-To: <20170623190159.5ct2mgjcm6vuulz6@sigill.intra.peff.net> Jeff King writes: > On Fri, Jun 23, 2017 at 09:01:18AM +0200, Michael Haggerty wrote: > >> * Change patch 17 "packed_ref_store: support iteration" to always >> iterate over the packed refs using `DO_FOR_EACH_INCLUDE_BROKEN`. >> This switches off the check in the packed-ref iterator of whether a >> reference is broken. This is now checked only in >> `files_ref_iterator_advance()`, after the packed and loose >> references have been merged together. It also saves some work. > > I'm curious why you prefer this solution to just removing the code > entirely. Wouldn't it be an error to call the packed ref iterator > without INCLUDE_BROKEN? The "entries may not be valid" thing is a > property of the packed-refs concept itself, not a particular caller's > view of it. Thanks for pointing it out. I was wondering about the same thing and you phrased it a lot more succinctly than the draft I was writing.