From: Ian Jackson Date: Sun, 19 Aug 2018 22:58:49 +0000 (+0100) Subject: git-debrebase: Introduce new `fail_unprocessable' X-Git-Tag: archive/debian/6.7~13 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=849364df60ca1dfedfbd23597fdab6a98881cb19;p=dgit.git 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 --- diff --git a/git-debrebase b/git-debrebase index 9d0bda0b..484fcdca 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} }