diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-08-19 23:58:49 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-08-20 00:04:42 +0100 |
commit | 849364df60ca1dfedfbd23597fdab6a98881cb19 (patch) | |
tree | 85e33de950f440354de853e4474020b2ecaced13 /git-debrebase | |
parent | 625ef9cc461653073175be47c4b6a2a9e25c13d1 (diff) |
git-debrebase: Introduce new `fail_unprocessable'
This is called when we want to call `fail' because we have found an
unprocessable commit.
NFC.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'git-debrebase')
-rwxr-xr-x | git-debrebase | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/git-debrebase b/git-debrebase index 9d0bda0..484fcdc 100755 --- a/git-debrebase +++ b/git-debrebase @@ -439,6 +439,11 @@ sub record_gdrlast ($$;$) { push @deferred_updates, "update $gdrlast $newvalue $oldvalue"; } +sub fail_unprocessable ($) { + my ($msg) = @_; + fail $msg; +}; + sub gbp_pq_export ($$$) { my ($bname, $base, $tip) = @_; # must be run in a workarea. $bname and patch-queue/$bname @@ -1054,7 +1059,7 @@ sub keycommits ($;$$$$$) { my $clogonly; my $cl; my $found_pm; - $fatal //= sub { fail $_[1]; }; + $fatal //= sub { fail_unprocessable $_[1]; }; my $x = sub { my ($cb, $tagsfx, $mainwhy, $xwhy) = @_; my $why = $mainwhy.$xwhy; @@ -1179,7 +1184,7 @@ sub walk ($;$$$) { if ($nogenerate) { return (undef,undef); } - fail "found unprocessable commit, cannot cope". + fail_unprocessable "found unprocessable commit, cannot cope". (defined $cl->{Why} ? "; $cl->{Why}:": ':'). " (commit $cur) (d.". (join ' ', map { sprintf "%#x", $_->{Differs} } |