summaryrefslogtreecommitdiff
path: root/git-difftool--helper.sh
diff options
context:
space:
mode:
authorDavid Aguilar <davvid@gmail.com>2010-01-10 04:02:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-01-10 06:41:29 (GMT)
commit61ed71dcff8448b0700ef032aa1f962649306624 (patch)
treeab6c9baa1021cd234ea7505d209a4bcd5e7349bc /git-difftool--helper.sh
parentdb367136605868f5971d42501a48820ccdcb8b08 (diff)
downloadgit-61ed71dcff8448b0700ef032aa1f962649306624.zip
git-61ed71dcff8448b0700ef032aa1f962649306624.tar.gz
git-61ed71dcff8448b0700ef032aa1f962649306624.tar.bz2
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>
Diffstat (limited to 'git-difftool--helper.sh')
-rwxr-xr-xgit-difftool--helper.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/git-difftool--helper.sh b/git-difftool--helper.sh
index 1b13808..3621f28 100755
--- a/git-difftool--helper.sh
+++ b/git-difftool--helper.sh
@@ -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