On Thu, 9 Jun 2011, Michael Nahas wrote: > Hi Peff, > > First, thanks for correcting my diff-without-NEXT-and-WTREE to > diff-with-NEXT-and-WTREE pairing. > > Second, I agree that the index is more than just NEXT. There were > good reasons behind calling it "NEXT" and not "INDEX". NEXT has to be _well defined_ (is it tree-ish or a multi-tree in some cases), and definition examined if it is _useful_ (e.g. if you can get results of "git diff" with "git diff NEXT <sth>..." both for conflicted and resolved cleanly entries). This thread served to specify original handwavy definition of NEXT... > Third, I didn't know for sure that "git diff" during a merge conflict > would produce a three-way-diff result, but I suspected it would. (You > really didn't have to produce all that code - I would have accepted > your word as an expert. But thanks!) So, yes, the two-way merge > result of "git diff NEXT WTREE" would be different. > > I could argue that git should allow a 4-way diff where "git diff NEXT > WTREE OURS THEIR" prints all the unresolved changes as coming from > OURS or THEIR or neither. But I think that's silly. It would be "git diff NEXT OURS THEIRS WTREE" or "git diff BASE OURS THEIRS WTREE" -- the putative merge results should be last; the convention of combined diff format is like for ordinary diff: first source(s), then destination. > > I will say that "git diff NEXT WTREE" will tell you what's left > unresolved and most of it is in <<<<====>>>>> blocks that tell you > whether it came from OURS or THEIRS. If the user has any discipline, > they won't introduce unnecessary changes that were not necessary for > the merge. If they don't have discipline, we really can't help them. What if he/she removed conflict markers, test compiled... and realized that it was mismerge, then fixed? Then to examine current fixed contents he/she doesn't have help of <<<< ==== >>>> blocks... > > I'm not saying there is no use for a 3-way merge. In fact, I'd guess > it's a requirement so that Alice can check Bob's merge before Bob > commits. But I'm fine with making it "git diff --3-way" or the silly > "git diff NEXT WTREE OURS THEIRS" because I think its "git diff NEXT > WTREE" will be good enough 99% of the time. "git diff --cc". But I think with having to say explicitly "git diff --3way" / "git diff --cc" Alice wouldn't know that it has such useful tool... P.S. Could you not quote text in bulk, if you are not answering to it block by block? It is unnecessary download, and burden of scrolling down to check if there is anything added at bottom. -- Jakub Narebski Poland -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html