Community
Participate
Working Groups
Eclipse EGit (Incubation) 0.10.0.201011021512 org.eclipse.egit.feature.group On the command line I did: git stash ;git checkout <other_branch> ; git stash pop In Eclipse, I did: Right click on Project > Refresh. File is shown as being in conflict. I then changed the file to fix the conflict - though didn't add the file with either egit or git to mark it as merged. I didn't think I would need to do this as egit normally seems to add + commit changes in one operation a la git commit -a. I right clicked on the project > commit. The action gave a scary error: org.eclipse.team.core.TeamException: Committing changes at org.eclipse.egit.core.op.CommitOperation$1.run(CommitOperation.java:181) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957) at org.eclipse.egit.core.op.CommitOperation.execute(CommitOperation.java:192) at org.eclipse.egit.ui.internal.actions.CommitActionHandler$2.run(CommitActionHandler.java:206) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: org.eclipse.jgit.errors.NotSupportedException: Cannot work with other stages than zero right now. Won't write corrupt index. at org.eclipse.jgit.lib.GitIndex.checkWriteOk(GitIndex.java:348) at org.eclipse.jgit.lib.GitIndex.write(GitIndex.java:268) at org.eclipse.egit.core.op.CommitOperation.doCommits(CommitOperation.java:295) at org.eclipse.egit.core.op.CommitOperation.access$8(CommitOperation.java:281) at org.eclipse.egit.core.op.CommitOperation$1.run(CommitOperation.java:178) ... 5 more org.eclipse.jgit.errors.NotSupportedException: Cannot work with other stages than zero right now. Won't write corrupt index. at org.eclipse.jgit.lib.GitIndex.checkWriteOk(GitIndex.java:348) at org.eclipse.jgit.lib.GitIndex.write(GitIndex.java:268) at org.eclipse.egit.core.op.CommitOperation.doCommits(CommitOperation.java:295) at org.eclipse.egit.core.op.CommitOperation.access$8(CommitOperation.java:281) at org.eclipse.egit.core.op.CommitOperation$1.run(CommitOperation.java:178) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957) at org.eclipse.egit.core.op.CommitOperation.execute(CommitOperation.java:192) at org.eclipse.egit.ui.internal.actions.CommitActionHandler$2.run(CommitActionHandler.java:206) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
This can't happen anymore as GitIndex was deleted and completely replaced by DirCache which should handle this properly.