Re: [PATCH 2/9] merge-recursive: clarify code in was_tracked()
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 7, 2016, 11:17 UTC
- Message-ID
- <alpine.DEB.2.20.1607071316390.6426@virtualbox>
- In-Reply-To
- <xmqqr3b6u6mb.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Wed, 6 Jul 2016, Junio C Hamano wrote:
Show 10 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> 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.
Show 6 quoted lines
> [...] > 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