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

Bug 348266

Summary: [Server]Git-status response to give "diverged" information
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: GitAssignee: Tomasz Zarna <tomasz.zarna>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 0.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description libing wang CLA 2011-06-03 15:16:09 EDT
I noticed this problem when I went through M8 conflict merge cases addressed in http://wiki.eclipse.org/Orion/Manual_Test_Cases#Remote_deleted_and_local_modified_the_same_file.

In this case , remote deleted and local modified the same file. Orion works well on detecting the conflict and resolve it.
But there is a potential issue in the case.
Generally we use stage action on a conflicting file to resolve it.
This works well in test case 1(http://wiki.eclipse.org/Orion/Manual_Test_Cases#Both_repository_modified_the_same_file)  and test case 3(http://wiki.eclipse.org/Orion/Manual_Test_Cases#Remote_modified_and_local_deleted_the_same_file).
After the "resolve conflict" action , the file is staged to the staged zone. And user can use commit action to commit it. 
But in test case 2 , the file does not appear in the staged zone . So user can not proceed to commit.
So I used git status in git bash to confirm why , it says :

lwang@WSLWANG ~/testMerge/mergetestnew/local1 (master|MERGING)
$ git status
# On branch master
# Your branch and 'origin/master' have diverged,
# and have 1 and 1 different commit(s) each, respectively.
#
nothing to commit (working directory clean)

I am wondering if we should show information like this . Otherwise user has no idea if their local repo is still in MERGING case and they can not do any further actions from Orion.
Comment 1 libing wang CLA 2011-06-03 15:21:39 EDT
Additional description;
In order to work this around , in my code I am doing an auto-commit by playing tricks below.

If I am staging a conflicting file and do not see it in the staged zone later (when I reload git status programatically) , I do a commit with the message "resolved deletion conflicts on file ***" . This is really temporary.
Comment 2 Tomasz Zarna CLA 2011-07-21 06:01:58 EDT
I think we've got this covered with those little log widgets on the Status Page. One of them is showing outgoing changes in your local branch comparing to the remote, the second one shows the opposite, changes on the remote which are not in your branch. If they both are showing something this means "Your branch and 'origin/master' have diverged". Am I right?
Comment 3 Tomasz Zarna CLA 2011-08-18 10:04:33 EDT
Closing as "works for me" with those log widgets mentioned in the previous comment. Feel free to reopen if you don't think this is an acceptable solution.