Skip to content

Commit 4cacc62

Browse files
sschuberthgitster
authored andcommitted
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 <[email protected]> Acked-by: David Aguilar <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 74cf9bd commit 4cacc62

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git-difftool--helper.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ TOOL_MODE=diff
1111
# difftool.prompt controls the default prompt/no-prompt behavior
1212
# and is overridden with $GIT_DIFFTOOL*_PROMPT.
1313
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)
1516
if test "$prompt" = true; then
1617
test -z "$GIT_DIFFTOOL_NO_PROMPT"
1718
else

0 commit comments

Comments
 (0)