Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326674

Summary: [sync] wrong compare input for files in node <working tree> and <staged changes>
Product: [Technology] EGit Reporter: Stefan Lay <stefan.lay>
Component: UIAssignee: Dariusz Luksza <dariusz.luksza>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: caniszczyk, dariusz.luksza
Version: 0.9.0   
Target Milestone: 0.10.0-M3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
zipped repository to reproduce error
none
compare view with conflicts none

Description Stefan Lay CLA 2010-09-30 10:22:52 EDT
In the Git Change Set model, I have entries in the nodes <working tree> and <staged changes>. When I double click on them I get the compare editor which shows the changes of the HEAD commit compared to the preivious one but not the change between the workspace resp. the index and the HEAD.
Comment 1 Dariusz Luksza CLA 2010-11-22 18:48:15 EST
Change:
http://egit.eclipse.org/r/1930
should fix this issue.
Comment 2 Stefan Lay CLA 2010-12-06 07:26:19 EST
Created attachment 184588 [details]
zipped repository to reproduce error
Comment 3 Stefan Lay CLA 2010-12-06 07:27:15 EST
Created attachment 184589 [details]
compare view with conflicts
Comment 4 Dariusz Luksza CLA 2010-12-06 08:42:43 EST
OK, now I see the problem. For some reasons the common ancestor of Calc4.java is empty. I'll investigate it later today.
Comment 5 Dariusz Luksza CLA 2010-12-06 12:54:27 EST
As I mentioned before this issue is connected with resolving of common ancestor for staged file.

Here is scenario for reproducing this issue:
* create and commit new file to repository
* make change in nearly created file and stage it
* launch synchronization with included local changes
When compare view for new this file is launched it shows conflicting change because common ancestor is empty.

In this case common ancestor should be same as remote version. Therefore we have an issue in algorithm of calculating common ancestor.
Comment 6 Dariusz Luksza CLA 2010-12-06 12:59:55 EST
I've created new bug for tracking this issue 331929
Comment 7 Dariusz Luksza CLA 2010-12-15 14:10:38 EST
Fixed with 708e8f6ce344648347e6c287e144e5168856e3d4
Comment 8 Stefan Lay CLA 2011-07-15 10:04:18 EDT
Double clicking on staged change still shows HEAD~1 on the right hand side.
Comment 9 Stefan Lay CLA 2011-07-15 11:53:06 EDT
Fixed with 4e13a29ea43611d5e34467df72d85b7a757ec4a8