Skip to content

Commit

Permalink
Make difftool.prompt fall back to mergetool.prompt
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Schuberth authored and Junio C Hamano committed Jan 22, 2010
1 parent 74cf9bd commit 4cacc62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git-difftool--helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4cacc62

Please sign in to comment.