Code

notes: track whether notes_trees were changed at all
[git.git] / git-difftool--helper.sh
index d806eaef541742f0cd3ab47c855e01749d7b6535..524f5ea8ab14bb44e5a8e6393e40c0ec5c1ddaa2 100755 (executable)
@@ -3,7 +3,7 @@
 # This script is typically launched by using the 'git difftool'
 # convenience command.
 #
-# Copyright (c) 2009-2010 David Aguilar
+# Copyright (c) 20092010 David Aguilar
 
 TOOL_MODE=diff
 . git-mergetool--lib
@@ -11,7 +11,8 @@ TOOL_MODE=diff
 # difftool.prompt controls the default prompt/no-prompt behavior
 # and is overridden with $GIT_DIFFTOOL*_PROMPT.
 should_prompt () {
-       prompt=$(git config --bool difftool.prompt || echo true)
+       prompt_merge=$(git config --bool mergetool.prompt || echo true)
+       prompt=$(git config --bool difftool.prompt || echo $prompt_merge)
        if test "$prompt" = true; then
                test -z "$GIT_DIFFTOOL_NO_PROMPT"
        else
@@ -48,11 +49,10 @@ launch_merge_tool () {
        fi
 
        if use_ext_cmd; then
-               $GIT_DIFFTOOL_EXTCMD "$LOCAL" "$REMOTE"
+               eval $GIT_DIFFTOOL_EXTCMD '"$LOCAL"' '"$REMOTE"'
        else
                run_merge_tool "$merge_tool"
        fi
-
 }
 
 if ! use_ext_cmd; then