Bug 426775 - Team Synchronize marks files as conflicts after Synchronize Workspace and Merge
Summary: Team Synchronize marks files as conflicts after Synchronize Workspace and Merge
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 3.0.3   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 347071
Blocks:
  Show dependency tree
 
Reported: 2014-01-28 05:22 EST by Stefan Cordes CLA
Modified: 2014-01-28 05:25 EST (History)
1 user (show)

See Also:


Attachments
Incoming Change (9.04 KB, image/png)
2014-01-28 05:23 EST, Stefan Cordes CLA
no flags Details
After-Merge-Conflict-is-shown (16.95 KB, image/png)
2014-01-28 05:23 EST, Stefan Cordes CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Cordes CLA 2014-01-28 05:22:57 EST
Following case:
2 Developers are working on the same project (Andy and Betty).
Both are up to date with master branch (Repository contains a file test-file.txt).
Both are using Eclipse 4.2.1 with EGit 3.0.3 and JGit 3.0.3.
Both have "Always launch fetch before synchronization" checked.
Both have Project test-eclipse-team-synchronize in 
${workspace_loc}\test-eclipse-team-synchronize 
with remote-repository https://github.com/rscadrde/test-eclipse-team-synchronize.git cloned in the workspace:
${workspace_loc}\test-eclipse-team-synchronize\.git 

Developer Andy is making a change on test-file.txt (adding one line).
Andy uses "Right mouse" "Team" "Commit..."  and "Commit and Push"

Developer Betty wants to check for changes and uses "Right Mouse" "Team" "Synchronize Workspace".
(a fetch is done as configured in preferences)
and one incoming change (blue) is shown. (See Git-Synchronize-One-Incoming-Change.PNG)

Now still ok and "git status" shows:

# On branch master
# Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
#   (use "git pull" to update your local branch)
#
nothing to commit, working directory clean

After pressing "Merge" in Synchronize View (either on Project or on File) the changes are merged, but
file is marked as conflict. (see After-Merge-Conflict-is-shown.PNG)

"git status" shows:
# On branch master
# Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
#   (use "git pull" to update your local branch)
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   test-file.txt
#
no changes added to commit (use "git add" and/or "git commit -a")

This should not be after a "merge" in "Synchronize view".

----------

Expected behaviour is that "merge" in "Synchronize view" brings the same result as a "git merge FETCH_HEAD" command:

* Changes are merged and workspace is clean:

C:\${workspace_loc}\test-eclipse-team-synchronize>git merge FETCH_HEAD
Updating 8dc7166..13fdc35
Fast-forward
 test-file.txt | 1 +
 1 file changed, 1 insertion(+)

C:\${workspace_loc}\test-eclipse-team-synchronize>git status
# On branch master
nothing to commit, working directory clean

Workaround is to use a "Team" "Pull" after reviewing all changes and never press "Merge" on "blue"-files.

Please check why the merged file is not marked correctly.
Comment 1 Stefan Cordes CLA 2014-01-28 05:23:34 EST
Created attachment 239382 [details]
Incoming Change
Comment 2 Stefan Cordes CLA 2014-01-28 05:23:54 EST
Created attachment 239383 [details]
After-Merge-Conflict-is-shown