summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Aguilar <davvid@gmail.com>2009-04-07 01:21:20 -0700
committerJunio C Hamano <gitster@pobox.com>2009-04-07 22:19:56 -0700
commitafcbc8e7ecb18a3ee542e808f02f5df7d56d5bdc (patch)
tree6a057ce275aa7d4998846e21452c84616357f6b0
parent1c0f3d224eff2ff8ca8442811edb5a6830adba1a (diff)
downloadgit-afcbc8e7ecb18a3ee542e808f02f5df7d56d5bdc.tar.gz
difftool: move 'git-difftool' out of contrib
This prepares 'git-difftool' and its documentation for mainstream use. 'git-difftool-helper' became 'git-difftool--helper' since users should not use it directly. 'git-difftool' was added to the list of commands as an ancillaryinterrogator. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--.gitignore2
-rw-r--r--Documentation/config.txt18
-rw-r--r--Documentation/git-difftool.txt (renamed from contrib/difftool/git-difftool.txt)0
-rw-r--r--Makefile2
-rw-r--r--command-list.txt1
-rwxr-xr-xgit-difftool--helper.sh (renamed from contrib/difftool/git-difftool-helper)2
-rwxr-xr-xgit-difftool.perl (renamed from contrib/difftool/git-difftool)6
7 files changed, 27 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 1c57d4c958..a36da9d981 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,6 +35,8 @@ git-diff
git-diff-files
git-diff-index
git-diff-tree
+git-difftool
+git-difftool--helper
git-describe
git-fast-export
git-fast-import
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 3afd124749..94ef1a62f9 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -667,6 +667,24 @@ diff.suppressBlankEmpty::
A boolean to inhibit the standard behavior of printing a space
before each empty output line. Defaults to false.
+diff.tool::
+ Controls which diff tool is used. `diff.tool` overrides
+ `merge.tool` when used by linkgit:git-difftool[1] and has
+ the same valid values as `merge.tool` minus "tortoisemerge"
+ and plus "kompare".
+
+difftool.<tool>.path::
+ Override the path for the given tool. This is useful in case
+ your tool is not in the PATH.
+
+difftool.<tool>.cmd::
+ Specify the command to invoke the specified diff tool.
+ The specified command is evaluated in shell with the following
+ variables available: 'LOCAL' is set to the name of the temporary
+ file containing the contents of the diff pre-image and 'REMOTE'
+ is set to the name of the temporary file containing the contents
+ of the diff post-image.
+
diff.wordRegex::
A POSIX Extended Regular Expression used to determine what is a "word"
when performing word-by-word difference calculations. Character
diff --git a/contrib/difftool/git-difftool.txt b/Documentation/git-difftool.txt
index af68466ebc..af68466ebc 100644
--- a/contrib/difftool/git-difftool.txt
+++ b/Documentation/git-difftool.txt
diff --git a/Makefile b/Makefile
index 7867eaccdb..a80055f38d 100644
--- a/Makefile
+++ b/Makefile
@@ -277,6 +277,7 @@ TEST_PROGRAMS =
SCRIPT_SH += git-am.sh
SCRIPT_SH += git-bisect.sh
+SCRIPT_SH += git-difftool--helper.sh
SCRIPT_SH += git-filter-branch.sh
SCRIPT_SH += git-lost-found.sh
SCRIPT_SH += git-merge-octopus.sh
@@ -296,6 +297,7 @@ SCRIPT_SH += git-submodule.sh
SCRIPT_SH += git-web--browse.sh
SCRIPT_PERL += git-add--interactive.perl
+SCRIPT_PERL += git-difftool.perl
SCRIPT_PERL += git-archimport.perl
SCRIPT_PERL += git-cvsexportcommit.perl
SCRIPT_PERL += git-cvsimport.perl
diff --git a/command-list.txt b/command-list.txt
index 3583a33ee9..fb03a2ebb5 100644
--- a/command-list.txt
+++ b/command-list.txt
@@ -33,6 +33,7 @@ git-diff mainporcelain common
git-diff-files plumbinginterrogators
git-diff-index plumbinginterrogators
git-diff-tree plumbinginterrogators
+git-difftool ancillaryinterrogators
git-fast-export ancillarymanipulators
git-fast-import ancillarymanipulators
git-fetch mainporcelain common
diff --git a/contrib/difftool/git-difftool-helper b/git-difftool--helper.sh
index 4b0daec5a7..fc61416acb 100755
--- a/contrib/difftool/git-difftool-helper
+++ b/git-difftool--helper.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# git-difftool-helper is a GIT_EXTERNAL_DIFF-compatible diff tool launcher.
+# git-difftool--helper is a GIT_EXTERNAL_DIFF-compatible diff tool launcher.
# This script is typically launched by using the 'git difftool'
# convenience command.
#
diff --git a/contrib/difftool/git-difftool b/git-difftool.perl
index 8c160e5bb4..8857ac8a4c 100755
--- a/contrib/difftool/git-difftool
+++ b/git-difftool.perl
@@ -2,9 +2,9 @@
# Copyright (c) 2009 David Aguilar
#
# This is a wrapper around the GIT_EXTERNAL_DIFF-compatible
-# git-difftool-helper script. This script exports
+# git-difftool--helper script. This script exports
# GIT_EXTERNAL_DIFF and GIT_PAGER for use by git, and
-# GIT_DIFFTOOL_NO_PROMPT and GIT_DIFF_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;
@@ -27,7 +27,7 @@ sub setup_environment
{
$ENV{PATH} = "$DIR:$ENV{PATH}";
$ENV{GIT_PAGER} = '';
- $ENV{GIT_EXTERNAL_DIFF} = 'git-difftool-helper';
+ $ENV{GIT_EXTERNAL_DIFF} = 'git-difftool--helper';
}
sub exe