diff options
author | Tim Henigan <tim.henigan@gmail.com> | 2012-03-29 09:39:18 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-04-23 12:00:42 -0700 |
commit | bf73fc212a159210398b6d46ed5e9101c650e7db (patch) | |
tree | 9f53002fc3812a60ff11368b17cfbcd6d89b76c3 /Documentation/git-difftool.txt | |
parent | 7e0abcec103b3649943b236881cf88e8fd6cf3a4 (diff) | |
download | git-bf73fc212a159210398b6d46ed5e9101c650e7db.tar.gz |
difftool: print list of valid tools with '--tool-help'
Since bc7a96a (mergetool--lib: Refactor tools into separate files,
2011-08-18), it is possible to add a new diff tool by creating a simple
script in the '$(git --exec-path)/mergetools' directory. Updating the
difftool help text is still a manual process, and the documentation can
easily go out of sync.
This commit teaches difftool the '--tool-help' option, which:
- Reads the list of valid tools from 'mergetools/*'
- Determines which of them are actually installed
- Determines which are capable of diffing (i.e. not just a merge tool)
- Prints the resulting list for the user
Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-difftool.txt')
-rw-r--r-- | Documentation/git-difftool.txt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt index aba5e76c52..31fc2e3aed 100644 --- a/Documentation/git-difftool.txt +++ b/Documentation/git-difftool.txt @@ -36,11 +36,9 @@ OPTIONS -t <tool>:: --tool=<tool>:: - Use the diff tool specified by <tool>. - Valid diff tools are: - araxis, bc3, deltawalker, diffuse, emerge, ecmerge, gvimdiff, - kdiff3, kompare, meld, opendiff, p4merge, tkdiff, vimdiff and - xxdiff. + Use the diff tool specified by <tool>. Valid values include + emerge, kompare, meld, and vimdiff. Run `git difftool --tool-help` + for the list of valid <tool> settings. + If a diff tool is not specified, 'git difftool' will use the configuration variable `diff.tool`. If the @@ -68,6 +66,9 @@ of the diff post-image. `$MERGED` is the name of the file which is being compared. `$BASE` is provided for compatibility with custom merge tool commands and has the same value as `$MERGED`. +--tool-help:: + Print a list of diff tools that may be used with `--tool`. + -x <command>:: --extcmd=<command>:: Specify a custom command for viewing diffs. |