[PATCHv2] Make difftool.prompt fall back to mergetool.prompt

From: Sebastian Schuberth <hidden>
Date: 2016-06-15 22:48:05
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 git-difftool--helper.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-difftool--helper.sh b/git-difftool--helper.sh
index 57e8e32..3438aba 100755
--- a/git-difftool--helper.sh
+++ b/git-difftool--helper.sh
@@ -12,7 +12,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
-- 
1.6.6.265.ga0f40
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help