chiark / gitweb /
git-debrebase: Introduce new `fail_unprocessable'
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Aug 2018 22:58:49 +0000 (23:58 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 19 Aug 2018 23:04:42 +0000 (00:04 +0100)
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>
git-debrebase

index 9d0bda0b41b4cc6ccce0c1f6bd87144bb36dd77d..484fcdca01644b0fec740d51e1ddfade437591eb 100755 (executable)
@@ -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} }