chiark / gitweb /
git-debrebase: walk: unprocessable: use fail, not die, and clean up
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 31 Jul 2018 06:55:47 +0000 (07:55 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 31 Jul 2018 06:55:47 +0000 (07:55 +0100)
Make this message like the one printed by $x->($fatal, ...) in
keycommits.  That is more consistent and also nicer.  There is no need
for the line number etc. either.

This is mentioned in #905003.

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

index 07e5f47..0c351a4 100755 (executable)
@@ -679,10 +679,11 @@ sub walk ($;$$) {
        if ($nogenerate) {
            return (undef,undef);
        }
-       die "commit $cur: Cannot cope with this commit (d.".
+       fail "found unprocessable commit, cannot cope:".
+           (defined $cl->{Why} ? "; $cl->{Why}": '').
+           " (commit $cur) (d.".
            (join ' ', map { sprintf "%#x", $_->{Differs} }
             @{ $cl->{Parents} }).
-           (defined $cl->{Why} ? "; $cl->{Why}": '').
                 ")";
     };