chiark / gitweb /
git-debrebase: scrap: Make it honour --noop-ok
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Aug 2018 13:05:43 +0000 (14:05 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Aug 2018 13:05:43 +0000 (14:05 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase

index 62fbf61..4046425 100755 (executable)
@@ -1579,7 +1579,10 @@ sub cmd_conclude () {
 
 sub cmd_scrap () {
     my ($ffq_prev, $gdrlast, $ffq_prev_commitish) = ffq_prev_info();
-    fail "No ongoing git-debrebase session." unless $ffq_prev_commitish;
+    if (!$ffq_prev_commitish) {
+       fail "No ongoing git-debrebase session." unless $opt_noop_ok;
+       finish 0;
+    }
     my $scrapping_head = get_head();
     badusage "no arguments allowed" if @ARGV;
     push @deferred_updates,