summaryrefslogtreecommitdiff
path: root/git-difftool--helper.sh
diff options
context:
space:
mode:
authorSebastian Schuberth <sschuberth@gmail.com>2010-01-22 17:36:36 +0100
committerJunio C Hamano <gitster@pobox.com>2010-01-22 15:57:45 -0800
commit4cacc621f80bbd878a320a664dff1440a9358785 (patch)
tree3f95cc805298acb5d53de2731a7a75beb0efa13c /git-difftool--helper.sh
parent74cf9bdda693e4c7b9443dea6a30d52f55f16517 (diff)
downloadgit-4cacc621f80bbd878a320a664dff1440a9358785.tar.gz
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>
Diffstat (limited to 'git-difftool--helper.sh')
-rwxr-xr-xgit-difftool--helper.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-difftool--helper.sh b/git-difftool--helper.sh
index e43b5d64de..524f5ea8ab 100755
--- a/git-difftool--helper.sh
+++ b/git-difftool--helper.sh
@@ -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