Skip to content

Commit

Permalink
difftool: move 'git-difftool' out of contrib
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
davvid authored and gitster committed Apr 8, 2009
1 parent 1c0f3d2 commit afcbc8e
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -35,6 +35,8 @@ git-diff
git-diff-files git-diff-files
git-diff-index git-diff-index
git-diff-tree git-diff-tree
git-difftool
git-difftool--helper
git-describe git-describe
git-fast-export git-fast-export
git-fast-import git-fast-import
Expand Down
18 changes: 18 additions & 0 deletions Documentation/config.txt
Expand Up @@ -667,6 +667,24 @@ diff.suppressBlankEmpty::
A boolean to inhibit the standard behavior of printing a space A boolean to inhibit the standard behavior of printing a space
before each empty output line. Defaults to false. 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:: diff.wordRegex::
A POSIX Extended Regular Expression used to determine what is a "word" A POSIX Extended Regular Expression used to determine what is a "word"
when performing word-by-word difference calculations. Character when performing word-by-word difference calculations. Character
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions Makefile
Expand Up @@ -277,6 +277,7 @@ TEST_PROGRAMS =


SCRIPT_SH += git-am.sh SCRIPT_SH += git-am.sh
SCRIPT_SH += git-bisect.sh SCRIPT_SH += git-bisect.sh
SCRIPT_SH += git-difftool--helper.sh
SCRIPT_SH += git-filter-branch.sh SCRIPT_SH += git-filter-branch.sh
SCRIPT_SH += git-lost-found.sh SCRIPT_SH += git-lost-found.sh
SCRIPT_SH += git-merge-octopus.sh SCRIPT_SH += git-merge-octopus.sh
Expand All @@ -296,6 +297,7 @@ SCRIPT_SH += git-submodule.sh
SCRIPT_SH += git-web--browse.sh SCRIPT_SH += git-web--browse.sh


SCRIPT_PERL += git-add--interactive.perl SCRIPT_PERL += git-add--interactive.perl
SCRIPT_PERL += git-difftool.perl
SCRIPT_PERL += git-archimport.perl SCRIPT_PERL += git-archimport.perl
SCRIPT_PERL += git-cvsexportcommit.perl SCRIPT_PERL += git-cvsexportcommit.perl
SCRIPT_PERL += git-cvsimport.perl SCRIPT_PERL += git-cvsimport.perl
Expand Down
1 change: 1 addition & 0 deletions command-list.txt
Expand Up @@ -33,6 +33,7 @@ git-diff mainporcelain common
git-diff-files plumbinginterrogators git-diff-files plumbinginterrogators
git-diff-index plumbinginterrogators git-diff-index plumbinginterrogators
git-diff-tree plumbinginterrogators git-diff-tree plumbinginterrogators
git-difftool ancillaryinterrogators
git-fast-export ancillarymanipulators git-fast-export ancillarymanipulators
git-fast-import ancillarymanipulators git-fast-import ancillarymanipulators
git-fetch mainporcelain common git-fetch mainporcelain common
Expand Down
@@ -1,5 +1,5 @@
#!/bin/sh #!/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' # This script is typically launched by using the 'git difftool'
# convenience command. # convenience command.
# #
Expand Down
6 changes: 3 additions & 3 deletions contrib/difftool/git-difftool → git-difftool.perl
Expand Up @@ -2,9 +2,9 @@
# Copyright (c) 2009 David Aguilar # Copyright (c) 2009 David Aguilar
# #
# This is a wrapper around the GIT_EXTERNAL_DIFF-compatible # 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_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'. # Any arguments that are unknown to this script are forwarded to 'git diff'.


use strict; use strict;
Expand All @@ -27,7 +27,7 @@ sub setup_environment
{ {
$ENV{PATH} = "$DIR:$ENV{PATH}"; $ENV{PATH} = "$DIR:$ENV{PATH}";
$ENV{GIT_PAGER} = ''; $ENV{GIT_PAGER} = '';
$ENV{GIT_EXTERNAL_DIFF} = 'git-difftool-helper'; $ENV{GIT_EXTERNAL_DIFF} = 'git-difftool--helper';
} }


sub exe sub exe
Expand Down

0 comments on commit afcbc8e

Please sign in to comment.