summaryrefslogtreecommitdiff
path: root/git-debrebase
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-11 18:55:04 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-11 20:11:09 +0100
commit343532497ca085d0ed5a56982953cb4edcd151bc (patch)
treee3de0cfbfccd6ef59532c4fc402cdf590104c16e /git-debrebase
parenteec3f8c097bdb3f03499c9228f42d5cd2ce65786 (diff)
git-debrebase: merge: Defeat evals which might try to trap merge_failed
That would be dangerous because we're in the wrong directory and other things may be wrong. For example, if we continue we might overwrite wreckage with other wreckage. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'git-debrebase')
-rwxr-xr-xgit-debrebase8
1 files changed, 6 insertions, 2 deletions
diff --git a/git-debrebase b/git-debrebase
index 2137280..c3bd7ff 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -396,8 +396,12 @@ sub merge_failed ($$) {
push @m, "Wreckage left in $wrecknoteprefix/*.";
push @m, "See git-debrebase(1) section FAILED MERGES for suggestions.";
- # ^ xxx this section does not yet exist
- fail join '', map { "$_\n" } @m;
+
+ # use finish rather than fail, in case we are within an eval
+ # (that can happen inside walk!)
+ print STDERR "\n";
+ print STDERR "$us: $_\n" foreach @m;
+ finish 15;
}
sub mwrecknote ($$$) {