From: Ian Jackson Date: Sat, 11 Aug 2018 17:55:04 +0000 (+0100) Subject: git-debrebase: merge: Defeat evals which might try to trap merge_failed X-Git-Tag: archive/debian/6.7~84 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=343532497ca085d0ed5a56982953cb4edcd151bc 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 --- diff --git a/git-debrebase b/git-debrebase index 21372802..c3bd7ff2 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 ($$$) {