Re: [PATCH] merge-recursive: do not look at the index during recursive merge

2018-01-09 Thread Junio C Hamano
Elijah Newren writes: > Hi, > > On Tue, Jan 9, 2018 at 11:19 AM, Junio C Hamano wrote: > >> > I haven't come up with an addition to the test suite, but I suspect >> > this change is conceptually wrong. What if a call to this function >> > is made during a recursive, inner merge? > >

Re: [PATCH] merge-recursive: do not look at the index during recursive merge

2018-01-09 Thread Elijah Newren
Hi, On Tue, Jan 9, 2018 at 11:19 AM, Junio C Hamano wrote: > > I haven't come up with an addition to the test suite, but I suspect > > this change is conceptually wrong. What if a call to this function > > is made during a recursive, inner merge? Eek, good catch. > merge-recursiv

Re: [PATCH] merge-recursive: do not look at the index during recursive merge

2018-01-09 Thread Eric Sunshine
On Tue, Jan 9, 2018 at 1:19 PM, Junio C Hamano wrote: > When merging another branch into ours, if their tree is the same as > the common ancestor's, we can declare that our tree represents the > result of three-way merge. In such a case, the recursive merge > backend incorrectly used to create a

Re: [PATCH] merge-recursive: do not look at the index during recursive merge

2018-01-09 Thread Junio C Hamano
Junio C Hamano writes: > + ... > + test_tick && > + git commit --allow-empty -m "O2" && > + O1=$(git rev-parse HEAD) && > + > + git reset --hard $O0 && > + test_tick && > + git commit --allow-empty -m "O2" && > + O2=$(git rev-parse HEAD) && Does not affect the validit

[PATCH] merge-recursive: do not look at the index during recursive merge

2018-01-09 Thread Junio C Hamano
When merging another branch into ours, if their tree is the same as the common ancestor's, we can declare that our tree represents the result of three-way merge. In such a case, the recursive merge backend incorrectly used to create a commit out of our index, even when the index has changes. A re