chiark / gitweb /
git-debrebase: Refactor fail_unprocessable message construction
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 2 Oct 2018 13:10:52 +0000 (14:10 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 2 Oct 2018 13:13:13 +0000 (14:13 +0100)
Clearer and easier to mark up for translation.

No functional change (verified by grepping the test logs).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase

index 28d96ec583af6bf41e76e3ae03355dc5a979b98b..2c7828d1101edd4c6c98aa31b56cb560f6d1c9af 100755 (executable)
@@ -1243,12 +1243,14 @@ sub walk ($;$$$) {
        if ($nogenerate) {
            return (undef,undef);
        }
-       fail_unprocessable "found unprocessable commit, cannot cope".
-           (defined $cl->{Why} ? "; $cl->{Why}:": ':').
-           " (commit $cur) (d.".
-           (join ' ', map { sprintf "%#x", $_->{Differs} }
-            @{ $cl->{Parents} }).
-                ")";
+       my $d =
+           join ' ',
+           map { sprintf "%#x", $_->{Differs} }
+           @{ $cl->{Parents} };
+       fail_unprocessable sprintf +(defined $cl->{Why}
+ ? 'found unprocessable commit, cannot cope; %3$s: (commit %1$s) (d.%2$s)'
+ : 'found unprocessable commit, cannot cope: (commit %1$s) (d.%2$s)'),
+                                   $cur, $d, $cl->{Why};
     };
 
     my $build;