X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=git-debrebase;h=fd67629492dd08a220a4ebf29e426e869d108b29;hb=11feba1f44552f3232c52f4f2a55ff7f2f0c6175;hp=3cab3ad8837b4a28a4bc51be3bcad29d123ebd20;hpb=8b38c204c268e0e862036c273a6298ccc9ea46fd;p=dgit.git diff --git a/git-debrebase b/git-debrebase index 3cab3ad8..fd676294 100755 --- a/git-debrebase +++ b/git-debrebase @@ -973,19 +973,8 @@ sub cmd_analyse () { } sub ffq_prev_branchinfo () { - # => ('status', "message", [$current, $ffq_prev, $gdrlast]) - # 'status' may be - # branch message is undef - # weird-symref } no $current, - # notbranch } no $ffq_prev my $current = git_get_symref(); - return ('detached', 'detached HEAD') unless defined $current; - return ('weird-symref', 'HEAD symref is not to refs/') - unless $current =~ m{^refs/}; - my $ffq_prev = "refs/$ffq_refprefix/$'"; - my $gdrlast = "refs/$gdrlast_refprefix/$'"; - printdebug "ffq_prev_branchinfo branch current $current\n"; - return ('branch', undef, $current, $ffq_prev, $gdrlast); + return gdr_ffq_prev_branchinfo($current); } sub record_ffq_prev_deferred () { @@ -1505,6 +1494,9 @@ sub make_patches ($) { } sub cmd_make_patches () { + my $opt_quiet_would_amend; + GetOptions('quiet-would-amend!', \$opt_quiet_would_amend) + or die badusage("bad options to make-patches"); badusage "no arguments allowed" if @ARGV; my $old_head = get_head(); my $new = make_patches $old_head; @@ -1516,9 +1508,12 @@ sub cmd_make_patches () { snags_maybe_bail(); update_head_checkout $old_head, $new, 'make-patches'; } else { - fail "Patch export produced patch amendments". + print STDERR failmsg + "Patch export produced patch amendments". " (abandoned output commit $new).". - " Try laundering first."; + " Try laundering first." + unless $opt_quiet_would_amend; + finish 7; } }