From: Johannes Schindelin Date: Thu, 07 Jul 2016 11:17:49 GMT Subject: Re: [PATCH 2/9] merge-recursive: clarify code in was_tracked() Message-ID: In-Reply-To: Hi Junio, On Wed, 6 Jul 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > To understand why we're not done yet, the crucial point is *not* that the > > return value encodes the insert position. The crucial point is that > > despite asking for an index entry matching a specific name, we might not > > find one, *even if there is one*. > > I've been wondering why you keep saying "even though we didn't ask, > we look for stage#0", and now I see why. The cache_pos() interface > *is* about finding the stage#0 entry for the given path. Good that this is clarified now. > [...] > As you pointed out, we can return early without falling into the > generic "we are still looking at the same path" codepath when we > find thestage#0 entry, so I wouldn't mind doing something like the > following. > [...] As this is essentially what I wrote with some minor touch-ups, I just replaced my version with yours. Will resend, Dscho