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

Bug 323057

Summary: Synchronize View: all merge commits are displayed to be conflicting
Product: [Technology] EGit Reporter: Matthias Sohn <matthias.sohn>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dariusz.luksza, jamesblackburn+eclipse, remy.suen
Version: 0.9.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
screenshot: merge commits conflicting none

Description Matthias Sohn CLA 2010-08-18 11:54:04 EDT
using 
- jgit 11c5c9f7
- egit 633df748
- on helios
do
- from Repositories View 
  - clone jgit (all branches) from git://egit.eclipse.org/jgit.git
  - import all projects
  -> master branch is checked out
  - click "Synchronize" on tag v0.8.4

-> all merge commits are displayed as conflicting which can't be true since from v0.8.4 fast forward to master is possible. This can be tested using EGit :
- click "Create branch" from repositories view on tag v0.8.4, name it "test"
-> branch "test" is checked out
- click "Merge" on branch "test" in repositories view, select to merge branch "master"
-> result: fast-forward merge, q.e.d

repeating the same scenario the other way round (checkout "v0.8.4" and click synchronize on branch "master") leads to the same problem: again all merge commits are displayed to be conflicting.
Comment 1 Matthias Sohn CLA 2010-08-18 12:06:12 EDT
Created attachment 176915 [details]
screenshot: merge commits conflicting
Comment 2 Dariusz Luksza CLA 2010-08-18 15:57:22 EDT
It seams that criteria I've used for calculating change direction are not always true. Actually this it is calculated based on comparison remote SHA-1 vs. ancestor SHA-1 and base SHA-1 vs. ancestor.

Currently I don't have any idea how this can be done better, I'm open for any suggestions ;)
Comment 3 Remy Suen CLA 2010-08-20 12:28:51 EDT
The constants that are being to calculate the return value of GitModelCommit's getKind() method should be from Differencer instead of SyncInfo, by the way.
Comment 4 Dariusz Luksza CLA 2010-08-20 19:23:40 EDT
(In reply to comment #3)
> The constants that are being to calculate the return value of GitModelCommit's
> getKind() method should be from Differencer instead of SyncInfo, by the way.

Thank you Remy for this hint.

Here is patch with fix:
http://egit.eclipse.org/r/1358
Comment 5 Dariusz Luksza CLA 2010-08-28 13:37:41 EDT
Fixed with 8a77b0e19796c460a79308020cf2f3ec16cba184