mirror of
https://github.com/git/git.git
synced 2024-10-30 13:57:54 +01:00
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>
This commit is contained in:
parent
74cf9bdda6
commit
4cacc621f8
1 changed files with 2 additions and 1 deletions
|
@ -11,7 +11,8 @@ TOOL_MODE=diff
|
||||||
# difftool.prompt controls the default prompt/no-prompt behavior
|
# difftool.prompt controls the default prompt/no-prompt behavior
|
||||||
# and is overridden with $GIT_DIFFTOOL*_PROMPT.
|
# and is overridden with $GIT_DIFFTOOL*_PROMPT.
|
||||||
should_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
|
if test "$prompt" = true; then
|
||||||
test -z "$GIT_DIFFTOOL_NO_PROMPT"
|
test -z "$GIT_DIFFTOOL_NO_PROMPT"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue