@matheusbsbs / matheus-bagliano / commits / 4cacc621f8
Fork 0

Make difftool.prompt fall back to mergetool.prompt

The documentation states that "git-difftool falls back to git-mergetool config variables when the difftool equivalents have not been defined". Until now, this was not the case for "difftool.prompt". Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Acked-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sebastian Schuberth committed Jan 22, 2010 at 17:36 UTC 4cacc621f80bbd878a320a664dff1440a9358785
1 file changed +2 -1
git-difftool--helper.sh
+2 -1
@@ -11,7 +11,8 @@ TOOL_MODE=diff
11 # difftool.prompt controls the default prompt/no-prompt behavior
12 # and is overridden with $GIT_DIFFTOOL*_PROMPT.
13 should_prompt () {
14 - prompt=$(git config --bool difftool.prompt || echo true)
14 + prompt_merge=$(git config --bool mergetool.prompt || echo true)
15 + prompt=$(git config --bool difftool.prompt || echo $prompt_merge)
16 if test "$prompt" = true; then
17 test -z "$GIT_DIFFTOOL_NO_PROMPT"
18 else