difftool--helper: Remove use of the GIT_MERGE_TOOL variable
An undocumented mis-feature in git-difftool is that it allows you to specify a default difftool by setting GIT_MERGE_TOOL. This behavior was never documented and was included as an oversight back when git-difftool was maintained outside of git. git-mergetool never honored GIT_MERGE_TOOL so neither should git-difftool. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
db36713660
commit
61ed71dcff
@ -40,11 +40,10 @@ launch_merge_tool () {
|
||||
run_merge_tool "$merge_tool"
|
||||
}
|
||||
|
||||
# Allow GIT_DIFF_TOOL and GIT_MERGE_TOOL to provide default values
|
||||
test -n "$GIT_MERGE_TOOL" && merge_tool="$GIT_MERGE_TOOL"
|
||||
test -n "$GIT_DIFF_TOOL" && merge_tool="$GIT_DIFF_TOOL"
|
||||
|
||||
if test -z "$merge_tool"; then
|
||||
# GIT_DIFF_TOOL indicates that --tool=... was specified
|
||||
if test -n "$GIT_DIFF_TOOL"; then
|
||||
merge_tool="$GIT_DIFF_TOOL"
|
||||
else
|
||||
merge_tool="$(get_merge_tool)" || exit
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user