DESCRIPTION

[stagingView] Compare against HEAD for conflicting files

Previously, the first index entry was used (base stage, content of file
in common ancestor), which is confusing. Comparing against HEAD is more
sensible in that case.

Bug: 427054
Change-Id: I186448f79ff1d8a416a985543138ba8715a7705a
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Danika Greer
date: 2014-11-30 13:36:08.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2014-11-30 13:36:14.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/egit/job/egit-stable.gerrit/418/

-------------------------------------
author: Brenden Conley
date: 2014-11-30 13:36:59.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/egit/job/egit-stable.gerrit/418/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2014-11-30 13:37:54.000000000

Patch Set 1: -Verified

Build Started https://hudson.eclipse.org/egit/job/egit-stable.gerrit/419/

-------------------------------------
author: Brenden Conley
date: 2014-11-30 13:38:32.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/egit/job/egit-stable.gerrit/419/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2014-12-01 09:03:02.000000000

Patch Set 1: -Verified

Build Started https://hudson.eclipse.org/egit/job/egit-stable.gerrit/423/

-------------------------------------
author: Brenden Conley
date: 2014-12-01 09:18:06.000000000

Patch Set 1: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit-stable.gerrit/423/ : UNSTABLE

-------------------------------------
author: Douglas Trujillo
date: 2014-12-01 09:52:33.000000000

Patch Set 1: Code-Review-1

I think the intention to show the base version in the right hand pane was that the other two stages are shown already in the left hand pane. So it's kind of a poor man's 3 way compare.

If we do what you propose here we should offer 3 way compare like in the merge tool and show the same stage in the right pane like the merge tool does (currently it shows the other branch than your change. We should also show the shortened commit message in the title to make it easier to recognize which version is shown in which pane.

Alternatively we could simply correct the title of the right pane to "Common base version" or "Common ancestor".

Ideally we should have a 4 way compare which can show all 3 stages from the index and the workspace content in a 4th pane. p4merge [1] is a tool doing that in a nice way.

[1] http://www.perforce.com/product/components/perforce-visual-merge-and-diff-tools

-------------------------------------
author: Danika Greer
date: 2014-12-02 05:34:57.000000000

Patch Set 1:

> I think the intention to show the base version in the right hand pane was that the other two stages are shown already in the left hand pane. So it's kind of a poor man's 3 way compare.

I don't think there was any intention when this was chosen, apart from "CONFLICT" files are shown in unstaged changes, so compare against index like the other cases. It just so happens that the first index entry is the base stage.

Also, "two stages are shown already in the left hand pane" -> this is no longer the case after you started resolving conflicts.

I'm not sure. When someone wants the merge tool behavior, they can just use the merge tool instead, no? Or what would be the difference between this new compare and merge tool?

> Alternatively we could simply correct the title of the right pane to "Common base version" or "Common ancestor".

-1. I've heard from several people that the right pane "makes no sense", including the bug reporter. I myself sometimes just staged the conflict and then did compare to see the diff I actually wanted.

For modified files, comparing shows the differences to what is committed (or staged in case of partial staging). This is just as useful for conflicting files, for a "what's the effective result of this merge?".

So, in summary, I think the merge tool should be used for a nice real 3-way compare, and compare should be a simple "what would be the changes if I commit the file", as in other cases.

(Btw, I'll be on vacation the next few weeks, so won't be able to do any changes, sorry :).)

-------------------------------------
