Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331929 - [sync] Wrong resolving of common ancestor for new files
Summary: [sync] Wrong resolving of common ancestor for new files
Status: CLOSED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 0.9.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.10.0-M3   Edit
Assignee: Dariusz Luksza CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-06 12:59 EST by Dariusz Luksza CLA
Modified: 2010-12-15 14:09 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dariusz Luksza CLA 2010-12-06 12:59:25 EST
This issue was discovered by Stefan Lay while he was testing fix for bug 326674.

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 1 Dariusz Luksza CLA 2010-12-06 15:51:49 EST
This patch set should fix this issue:
http://egit.eclipse.org/r/2050

Because we cannot configure RevWalk used in GitModelObjectContainer.calculateAncestor(RevCommit) so that it will return base commit for files that does not exist in parent commit. Therefore I decided to overwrite getAncestor() method in GitCacheCompareInput.
Comment 2 Dariusz Luksza CLA 2010-12-15 14:09:51 EST
Fixed with patch 536566d1cac672f70da9ed7c3b97893629dae2aa