From: Ian Jackson Date: Sat, 4 Aug 2018 13:31:41 +0000 (+0100) Subject: git-debrebase: scrap: Run git-rebase --abort if applicable X-Git-Tag: archive/debian/6.5~2 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=76b90289f6bbd304e35d984cebd28a1cbc14d4fe git-debrebase: scrap: Run git-rebase --abort if applicable Signed-off-by: Ian Jackson --- diff --git a/git-debrebase b/git-debrebase index f4831c3c..24be35e3 100755 --- a/git-debrebase +++ b/git-debrebase @@ -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; diff --git a/git-debrebase.1.pod b/git-debrebase.1.pod index 28f30848..fe656747 100644 --- a/git-debrebase.1.pod +++ b/git-debrebase.1.pod @@ -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 [...] Rebases the delta queue