Code

difftool--helper: Update copyright and remove distracting comments
[git.git] / git-difftool--helper.sh
index b4500368c3268bb26aa22ccf75b9b2fd4bc94df1..1b138083d3642af596fe56a74c4f98321e6135fc 100755 (executable)
@@ -3,9 +3,8 @@
 # This script is typically launched by using the 'git difftool'
 # convenience command.
 #
-# Copyright (c) 2009 David Aguilar
+# Copyright (c) 2009-2010 David Aguilar
 
-# Load common functions from git-mergetool--lib
 TOOL_MODE=diff
 . git-mergetool--lib
 
@@ -20,7 +19,6 @@ should_prompt () {
        fi
 }
 
-# Sets up shell variables and runs a merge tool
 launch_merge_tool () {
        # Merged is the filename as it appears in the work tree
        # Local is the contents of a/filename
@@ -39,7 +37,6 @@ launch_merge_tool () {
                read ans
        fi
 
-       # Run the appropriate merge tool command
        run_merge_tool "$merge_tool"
 }
 
@@ -47,9 +44,9 @@ launch_merge_tool () {
 test -n "$GIT_MERGE_TOOL" && merge_tool="$GIT_MERGE_TOOL"
 test -n "$GIT_DIFF_TOOL" && merge_tool="$GIT_DIFF_TOOL"
 
-merge_tool=$(get_merge_tool "$merge_tool") || exit
-merge_tool_cmd="$(get_merge_tool_cmd "$merge_tool")"
-merge_tool_path="$(get_merge_tool_path "$merge_tool")" || exit
+if test -z "$merge_tool"; then
+       merge_tool="$(get_merge_tool)" || exit
+fi
 
 # Launch the merge tool on each path provided by 'git diff'
 while test $# -gt 6