From: Ian Jackson Date: Tue, 2 Oct 2018 13:10:52 +0000 (+0100) Subject: git-debrebase: Refactor fail_unprocessable message construction X-Git-Tag: archive/debian/7.0~34 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=7ec31b1b534340f4d5688c7862d1b95c11964059 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 --- diff --git a/git-debrebase b/git-debrebase index 28d96ec5..2c7828d1 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;