Re: [PATCH 2/9] merge-recursive: clarify code in was_tracked()

2016-07-07 Thread Johannes Schindelin
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 nam

Re: [PATCH 2/9] merge-recursive: clarify code in was_tracked()

2016-07-06 Thread Junio C Hamano
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 w

Re: [PATCH 2/9] merge-recursive: clarify code in was_tracked()

2016-07-02 Thread Johannes Schindelin
Hi Junio, On Fri, 1 Jul 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > I would like to propose this diff instead (it is larger, but with a net > > savings of one line): > > > > -- snipsnap -- > > diff --git a/merge-recursive.c b/merge-recursive.c > > index d5a593c..0eda51a 1006

Re: [PATCH 2/9] merge-recursive: clarify code in was_tracked()

2016-07-01 Thread Junio C Hamano
Johannes Schindelin writes: > I agree that the comment is not very good currently. But I disagree that > we are better off without any comment here. I meant we are better off without your particular version of comment which is misleading. I am all for a better comment to help those who are new

Re: [PATCH 2/9] merge-recursive: clarify code in was_tracked()

2016-07-01 Thread Johannes Schindelin
Hi Junio, On Wed, 29 Jun 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > It can be puzzling to see that was_tracked() tries to match an index > > entry by name even if cache_name_pos() returned a negative value. Let's > > clarify that cache_name_pos() implicitly looks for stage

Re: [PATCH 2/9] merge-recursive: clarify code in was_tracked()

2016-06-29 Thread Junio C Hamano
Johannes Schindelin writes: > It can be puzzling to see that was_tracked() tries to match an index > entry by name even if cache_name_pos() returned a negative value. Let's > clarify that cache_name_pos() implicitly looks for stage 0, while we are > also okay with finding other stages. > > Signed

[PATCH 2/9] merge-recursive: clarify code in was_tracked()

2016-06-29 Thread Johannes Schindelin
It can be puzzling to see that was_tracked() tries to match an index entry by name even if cache_name_pos() returned a negative value. Let's clarify that cache_name_pos() implicitly looks for stage 0, while we are also okay with finding other stages. Signed-off-by: Johannes Schindelin --- merge-