Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322537 - Add does not resolve rebase conflicts
Summary: Add does not resolve rebase conflicts
Status: RESOLVED WORKSFORME
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Christian Halstrick CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-12 10:32 EDT by Stefan Lay CLA
Modified: 2013-05-11 16:39 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Lay CLA 2010-08-12 10:32:26 EDT
I rebase on the command line and get conflicts. I edit them in Eclipse and select Team -> add to resolve the conflict. When I now enter rebase --continue on the command line there is a message:

"You must edit all merge conflicts and then
mark them as resolved using git add"

However, git status looks as expected. The reolved file is listed under "Changes to be committed:"
Comment 1 Christian Halstrick CLA 2010-10-18 09:32:36 EDT
I tried to reproduce this problem but was not successful. I am working with EGit 0.10.0.201010171825 from the latest succesful hudson builds. Here is exact script what I did:

In Eclipse I ...
- switch to a new empty workspace
- import all projects from http://egit.eclipse.org/jgit.git
- create two branches A and B based on eclipse/master
- checkout A 
- in project org.eclipse.jgit modify first line of /org.eclipse.jgit/src/org/eclipse/jgit/JGitText.java to '/**'
- save and commit what was changed
- checkout B 
- in project org.eclipse.jgit modify first line of /org.eclipse.jgit/src/org/eclipse/jgit/JGitText.java to '/***'
- save and commit what was changed

Now I switched to MSysGit prompt and ...
- cd to home directory of jgit repo
- check that B is checked out
- type 'git rebase A'. This leads to warnings about Conflicts

I switch back to Eclipse and ...
- in project org.eclipse.jgit I remove the conflict in the beginning of /org.eclipse.jgit/src/org/eclipse/jgit/JGitText.java
- I save the file and stage it via 'Team->Add'

Now I switched to MSysGit prompt and ...
- type 'git rebase --continue'   ---- this works!

Does this use-case work for you?
Comment 2 Neale Upstone CLA 2010-11-26 04:21:01 EST
Chris,

I've seen this one too.

On the (DOS) command line I've got pull set to rebase instead of merge.  I've seen this when I get a conflict on that rebase operation, and then try using Add in Eclipse to resolve it.  I then get the same error that Stefan reported.
Comment 3 Christian Halstrick CLA 2010-12-01 08:45:14 EST
I found out that I can reproduce that error with msysgit 1.7.0.2-preview20100309 but not anymore with 1.7.3.1-preview20101002. Something was changed in msysgit that this problem does not occur anymore for me. I asked the msysgit mailing list what they changed. But the solution seems to be clear: upgrade to msysgit 1.7.3.1-preview20101002 or newer.

Neale, could you try whether this helps you?
Comment 4 Neale Upstone CLA 2010-12-02 09:59:38 EST
I can confirm that I'm on git version 1.7.0.2.msysgit.0, so it sounds like I've seen the same problem.

When I next see fail a rebase, the I'll give it a go.

Still sounds like an interesting 'feature' that different versions of git do and don't see EGit's add, but do see there own, so news from the mailing list would be reassuring ;)
Comment 5 Christian Halstrick CLA 2010-12-03 06:40:28 EST
I agree, it's a very interesting feature. We triggered a discussion on http://groups.google.com/group/msysgit/browse_thread/thread/b1fe0ff97ce3b996# to ask what msysgit has changed. There is of course the chance that egit add is doing something wrong and msysgit rebase --continue just became more tolerant. Let's wait what the msysgit discussion brings before closing this bug.
Comment 6 Robin Rosenberg CLA 2013-05-11 16:39:02 EDT
Seems this is not a problem anymore