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 f4831c3c5b6c4f1a8a23cf58a1ebfeb0c074a7ce..24be35e353f1c716e9a8bfb0d1463bce9f588409 100755 (executable)
@@ -1593,6 +1593,9 @@ sub cmd_conclude () {
 }
 
 sub cmd_scrap () {
 }
 
 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;
     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 28f3084816064107440ab23f938091d4079269c1..fe65674735838fa3fe67566a5edf62e6550170bc 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.
 
 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
 =item git-debrebase new-upstream <new-version> [<upstream-details>...]
 
 Rebases the delta queue