| Summary: | RebaseCommand abort fails for a non-interactive rebase started from the command line | ||
|---|---|---|---|
| Product: | [Technology] JGit | Reporter: | Edwin Kempin <edwin.kempin> |
| Component: | JGit | Assignee: | Project Inbox <jgit.core-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | matthias.sohn, robin, stefan.lay |
| Version: | 2.4 | ||
| Target Milestone: | 3.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Edwin Kempin
I assume this is a non-interactive rebase (no -i option on rebase), right? In that case, I can reproduce this with EGit/JGit master. The menu item is there, but there's an exception because it looks in the wrong folder: org.eclipse.jgit.api.errors.JGitInternalException: /home/robin/egit/test-workspace/bare/.git/rebase-merge/head-name at org.eclipse.jgit.api.RebaseCommand.call(RebaseCommand.java:217) at org.eclipse.egit.core.op.RebaseOperation$1.run(RebaseOperation.java:102) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2327) at org.eclipse.egit.core.op.RebaseOperation.execute(RebaseOperation.java:119) at org.eclipse.egit.ui.internal.commands.shared.AbstractRebaseCommandHandler$1.run(AbstractRebaseCommandHandler.java:68) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) Caused by: java.io.FileNotFoundException: /home/robin/egit/test-workspace/bare/.git/rebase-merge/head-name at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:137) at org.eclipse.jgit.util.IO.readFully(IO.java:140) at org.eclipse.jgit.util.IO.readFully(IO.java:80) at org.eclipse.jgit.api.RebaseCommand.readFile(RebaseCommand.java:873) at org.eclipse.jgit.api.RebaseCommand.abort(RebaseCommand.java:843) at org.eclipse.jgit.api.RebaseCommand.call(RebaseCommand.java:215) ... 6 more It seems C Git creates a ".git/rebase-merge" folder for an interactive rebase, but a ".git/rebase-apply" folder for a non-interactive rebase. In the code which handles --continue and --abort, it checks for both folders. JGit currently only looks for ".git/rebase-merge". Support for aborting non-interactive rebase: https://git.eclipse.org/r/11017 Yes, this is about a non-interactive rebase. merged as 0e9f1cf57dac274f92a6db38197e14b55b3277af Pushed https://git.eclipse.org/r/#/c/11225/ for review to enable rebase menu in the Repositories View in this situation so that rebase can be aborted/skipped. Merged: http://git.eclipse.org/c/egit/egit.git/commit/?id=e7240dac5aa9ff4c3d9088e635ccfb085bb7ab25 I submitted bug 403954 for tracking implementation of "continue" for non-interactive rebase. |