Commit f67986b9 authored by Michael J Gruber's avatar Michael J Gruber Committed by Junio C Hamano

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.

719518f5 (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

Set IFS to a space locally for the tool search.
Signed-off-by: default avatarMichael J Gruber <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent 3e4f2373
......@@ -305,6 +305,7 @@ guess_merge_tool () {
# Loop over each candidate and stop when a valid merge tool is found.
IFS=' '
for tool in $tools
is_available "$tool" && echo "$tool" && return 0
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment