aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
index ae73cacbe0..936f5cab8d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
@@ -220,9 +220,19 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
if (monitor.isCancelled())
return abort(RebaseResult.ABORTED_RESULT);
- if (operation == Operation.CONTINUE)
+ if (operation == Operation.CONTINUE) {
newHead = continueRebase();
+ if (newHead == null) {
+ // continueRebase() returns null only if no commit was
+ // neccessary. This means that no changes where left over
+ // after resolving all conflicts. In this case, cgit stops
+ // and displays a nice message to the user, telling him to
+ // either do changes or skip the commit instead of continue.
+ return RebaseResult.NOTHING_TO_COMMIT_RESULT;
+ }
+ }
+
if (operation == Operation.SKIP)
newHead = checkoutCurrentHead();