summaryrefslogtreecommitdiff
path: root/git-mergetool--lib.sh
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2015-06-19 09:30:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-06-19 18:20:52 (GMT)
commitf67986b9098c21005f33182472a990d5c6e8a98d (patch)
tree4577b8ebd847ceb347313326c5ecbd89138aeff0 /git-mergetool--lib.sh
parent3e4f2373b295e19dbc1a6bd0e743f65b500b7bda (diff)
downloadgit-f67986b9098c21005f33182472a990d5c6e8a98d.zip
git-f67986b9098c21005f33182472a990d5c6e8a98d.tar.gz
git-f67986b9098c21005f33182472a990d5c6e8a98d.tar.bz2
mergetool-lib: fix default tool selection
When no diff nor merge tool is specified (config, option), mergetool-lib is supposed to choose a default tool from a set of tools. That set is constructed dynamically depending on the environment (graphical, editor setting) as a space separated string of tool names. 719518f (mergetool--lib: set IFS for difftool and mergetool, 2015-05-20) introduced a newline as IFS which breaks the parsing of the space separated list into items, resulting in a failed search for an available tool. Set IFS to a space locally for the tool search. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-mergetool--lib.sh')
-rw-r--r--git-mergetool--lib.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index 14b039d..54ac8e4 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -305,6 +305,7 @@ guess_merge_tool () {
EOF
# Loop over each candidate and stop when a valid merge tool is found.
+ IFS=' '
for tool in $tools
do
is_available "$tool" && echo "$tool" && return 0