@matheusbsbs / matheus-bagliano / commits / afcbc8e7ec
Fork 0

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>

David Aguilar committed Apr 7, 2009 at 01:21 UTC afcbc8e7ecb18a3ee542e808f02f5df7d56d5bdc
7 files changed +27 -4
.gitignore
+2
@@ -35,6 +35,8 @@ git-diff
35 git-diff-files
36 git-diff-index
37 git-diff-tree
38 +git-difftool
39 +git-difftool--helper
40 git-describe
41 git-fast-export
42 git-fast-import
Documentation/config.txt
+18
@@ -667,6 +667,24 @@ diff.suppressBlankEmpty::
667 A boolean to inhibit the standard behavior of printing a space
668 before each empty output line. Defaults to false.
669
670 +diff.tool::
671 + Controls which diff tool is used. `diff.tool` overrides
672 + `merge.tool` when used by linkgit:git-difftool[1] and has
673 + the same valid values as `merge.tool` minus "tortoisemerge"
674 + and plus "kompare".
675 +
676 +difftool.<tool>.path::
677 + Override the path for the given tool. This is useful in case
678 + your tool is not in the PATH.
679 +
680 +difftool.<tool>.cmd::
681 + Specify the command to invoke the specified diff tool.
682 + The specified command is evaluated in shell with the following
683 + variables available: 'LOCAL' is set to the name of the temporary
684 + file containing the contents of the diff pre-image and 'REMOTE'
685 + is set to the name of the temporary file containing the contents
686 + of the diff post-image.
687 +
688 diff.wordRegex::
689 A POSIX Extended Regular Expression used to determine what is a "word"
690 when performing word-by-word difference calculations. Character
Documentation/git-difftool.txt renamed
Makefile
+2
@@ -277,6 +277,7 @@ TEST_PROGRAMS =
277
278 SCRIPT_SH += git-am.sh
279 SCRIPT_SH += git-bisect.sh
280 +SCRIPT_SH += git-difftool--helper.sh
281 SCRIPT_SH += git-filter-branch.sh
282 SCRIPT_SH += git-lost-found.sh
283 SCRIPT_SH += git-merge-octopus.sh
@@ -296,6 +297,7 @@ SCRIPT_SH += git-submodule.sh
297 SCRIPT_SH += git-web--browse.sh
298
299 SCRIPT_PERL += git-add--interactive.perl
300 +SCRIPT_PERL += git-difftool.perl
301 SCRIPT_PERL += git-archimport.perl
302 SCRIPT_PERL += git-cvsexportcommit.perl
303 SCRIPT_PERL += git-cvsimport.perl
command-list.txt
+1
@@ -33,6 +33,7 @@ git-diff mainporcelain common
33 git-diff-files plumbinginterrogators
34 git-diff-index plumbinginterrogators
35 git-diff-tree plumbinginterrogators
36 +git-difftool ancillaryinterrogators
37 git-fast-export ancillarymanipulators
38 git-fast-import ancillarymanipulators
39 git-fetch mainporcelain common
git-difftool--helper.sh renamed
+1 -1
@@ -1,5 +1,5 @@
1 #!/bin/sh
2 -# git-difftool-helper is a GIT_EXTERNAL_DIFF-compatible diff tool launcher.
2 +# git-difftool--helper is a GIT_EXTERNAL_DIFF-compatible diff tool launcher.
3 # This script is typically launched by using the 'git difftool'
4 # convenience command.
5 #
git-difftool.perl renamed
+3 -3
@@ -2,9 +2,9 @@
2 # Copyright (c) 2009 David Aguilar
3 #
4 # This is a wrapper around the GIT_EXTERNAL_DIFF-compatible
5 -# git-difftool-helper script. This script exports
5 +# git-difftool--helper script. This script exports
6 # GIT_EXTERNAL_DIFF and GIT_PAGER for use by git, and
7 -# GIT_DIFFTOOL_NO_PROMPT and GIT_DIFF_TOOL for use by git-difftool-helper.
7 +# GIT_DIFFTOOL_NO_PROMPT and GIT_DIFF_TOOL for use by git-difftool--helper.
8 # Any arguments that are unknown to this script are forwarded to 'git diff'.
9
10 use strict;
@@ -27,7 +27,7 @@ sub setup_environment
27 {
28 $ENV{PATH} = "$DIR:$ENV{PATH}";
29 $ENV{GIT_PAGER} = '';
30 - $ENV{GIT_EXTERNAL_DIFF} = 'git-difftool-helper';
30 + $ENV{GIT_EXTERNAL_DIFF} = 'git-difftool--helper';
31 }
32
33 sub exe