contrib/difftool: use a separate config namespace for difftool commands
[git.git] / contrib / difftool / git-difftool
index 1fc087c5fc99962cc3b62810e4df97ebf7439a0c..0deda3a0e41511bb1b71d30d335b4909e8719169 100755 (executable)
@@ -4,7 +4,7 @@
 # This is a wrapper around the GIT_EXTERNAL_DIFF-compatible
 # git-difftool-helper script.  This script exports
 # GIT_EXTERNAL_DIFF and GIT_PAGER for use by git, and
-# GIT_NO_PROMPT and GIT_MERGE_TOOL for use by git-difftool-helper.
+# GIT_DIFFTOOL_NO_PROMPT and GIT_DIFF_TOOL for use by git-difftool-helper.
 # Any arguments that are unknown to this script are forwarded to 'git diff'.
 
 use strict;
@@ -18,8 +18,7 @@ my $DIR = abs_path(dirname($0));
 sub usage
 {
        print << 'USAGE';
-
-usage: git difftool [--no-prompt] [--tool=tool] ["git diff" options]
+usage: git difftool [--tool=<tool>] [--no-prompt] ["git diff" options]
 USAGE
        exit 1;
 }
@@ -50,12 +49,12 @@ sub generate_command
                }
                if ($arg eq '-t' or $arg eq '--tool') {
                        usage() if $#ARGV <= $idx;
-                       $ENV{GIT_MERGE_TOOL} = $ARGV[$idx + 1];
+                       $ENV{GIT_DIFF_TOOL} = $ARGV[$idx + 1];
                        $skip_next = 1;
                        next;
                }
                if ($arg =~ /^--tool=/) {
-                       $ENV{GIT_MERGE_TOOL} = substr($arg, 7);
+                       $ENV{GIT_DIFF_TOOL} = substr($arg, 7);
                        next;
                }
                if ($arg eq '--no-prompt') {