diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-08-04 13:40:15 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-08-04 13:41:32 +0100 |
commit | b58f7c61452fc5b8b7d70f735283ecdc1b5e8ac3 (patch) | |
tree | 2119287ac8176144bc3892e23c458f10183a9bf0 | |
parent | 999fd7ad45c4a442ffe199df4e43918bc192dcb4 (diff) |
git-debrebase: New feature `scrap'
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r-- | debian/changelog | 1 | ||||
-rwxr-xr-x | git-debrebase | 12 | ||||
-rw-r--r-- | git-debrebase.1.pod | 5 |
3 files changed, 18 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index fd3f102..787cd2c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ dgit (6.5~) unstable; urgency=medium * test suite: gdr-import-dgitview: New test for dgit dsc imports. * git-debrebase: Provide new convert-from-dgit-view operation. The output is, unavoidably, not very pretty. Closes:#905322. + * git-debrebase: New feature `scrap'. Closes:#905063. -- 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 diff --git a/git-debrebase.1.pod b/git-debrebase.1.pod index e544a8c..28f3084 100644 --- a/git-debrebase.1.pod +++ b/git-debrebase.1.pod @@ -106,6 +106,11 @@ If there is no ffq-prev, it is an error, unless --noop-ok. You should consider using B<conclude> instead, because that launders the branch too. +=item git-debrebase scrap + +Throws away all the work since the branch was last stitched. +This is done by rewinding you to ffq-prev. + =item git-debrebase new-upstream <new-version> [<upstream-details>...] Rebases the delta queue |