chiark / gitweb /
git-debrebase: scrap: Run git-rebase --abort if applicable
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Aug 2018 13:31:41 +0000 (14:31 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Aug 2018 13:32:14 +0000 (14:32 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase
git-debrebase.1.pod

index f4831c3..24be35e 100755 (executable)
@@ -1593,6 +1593,9 @@ sub cmd_conclude () {
 }
 
 sub cmd_scrap () {
+    if (currently_rebasing()) {
+       runcmd @git, qw(rebase --abort);
+    }
     my ($ffq_prev, $gdrlast, $ffq_prev_commitish) = ffq_prev_info();
     if (!$ffq_prev_commitish) {
        fail "No ongoing git-debrebase session." unless $opt_noop_ok;
index 28f3084..fe65674 100644 (file)
@@ -111,6 +111,8 @@ because that launders the branch too.
 Throws away all the work since the branch was last stitched.
 This is done by rewinding you to ffq-prev.
 
+If you are in the middle of a git-rebase, will abort that too.
+
 =item git-debrebase new-upstream <new-version> [<upstream-details>...]
 
 Rebases the delta queue