summaryrefslogtreecommitdiff
path: root/git-debrebase
diff options
context:
space:
mode:
Diffstat (limited to 'git-debrebase')
-rwxr-xr-xgit-debrebase12
1 files changed, 12 insertions, 0 deletions
diff --git a/git-debrebase b/git-debrebase
index 98e645a..62fbf61 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -1577,6 +1577,18 @@ sub cmd_conclude () {
do_stitch 'quick';
}
+sub cmd_scrap () {
+ my ($ffq_prev, $gdrlast, $ffq_prev_commitish) = ffq_prev_info();
+ fail "No ongoing git-debrebase session." unless $ffq_prev_commitish;
+ my $scrapping_head = get_head();
+ badusage "no arguments allowed" if @ARGV;
+ push @deferred_updates,
+ "update $gdrlast $ffq_prev_commitish $git_null_obj",
+ "update $ffq_prev $git_null_obj $ffq_prev_commitish";
+ snags_maybe_bail();
+ update_head_checkout $scrapping_head, $ffq_prev_commitish, "scrap";
+}
+
sub make_patches_staged ($) {
my ($head) = @_;
# Produces the patches that would result from $head if it were