David Aguilar [off-list ref] writes:
quoted hunk
run_merge_tool() was not setting $status, which prevented the
exit code for builtin tools from being forwarded to the caller.
Capture the exit status and add a test to guarantee the behavior.
Reported-by: Adria Farres <redacted>
Signed-off-by: David Aguilar <redacted>
---
git-mergetool--lib.sh | 1 +
t/t7800-difftool.sh | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index a40d3df..2b66351 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -221,6 +221,7 @@ run_merge_tool () {
else
run_diff_cmd "$1"
fi
+ status=$?
return $status
If you want to return the last exit status at the end of a function you
don't need any return at all.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."