summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-02 14:10:52 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-10-02 14:13:13 +0100
commit7ec31b1b534340f4d5688c7862d1b95c11964059 (patch)
tree51e921057626dec18696927e0ba5a90f57287ff0
parent22c4f9bd68ac3cfc6a88fe4b4baf0a3ffda0a8b2 (diff)
git-debrebase: Refactor fail_unprocessable message construction
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>
-rwxr-xr-xgit-debrebase14
1 files changed, 8 insertions, 6 deletions
diff --git a/git-debrebase b/git-debrebase
index 28d96ec..2c7828d 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -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;