From 4cefa495ca91ad833084ebf3f73c77997920ae9b Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Tue, 22 Dec 2009 21:27:14 -0800 Subject: git-difftool: Add '--gui' for selecting a GUI tool Users might prefer to have git-difftool use a different tool when run from a Git GUI. This teaches git-difftool to honor 'diff.guitool' when the '--gui' option is specified. This allows users to configure their preferred command-line diff tool in 'diff.tool' and a GUI diff tool in 'diff.guitool'. Reference: http://article.gmane.org/gmane.comp.version-control.git/133386 Signed-off-by: David Aguilar Signed-off-by: Junio C Hamano --- Documentation/git-difftool.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt index 8e9aed67d..a5bce6278 100644 --- a/Documentation/git-difftool.txt +++ b/Documentation/git-difftool.txt @@ -58,6 +58,12 @@ is set to the name of the temporary file containing the contents of the diff post-image. `$BASE` is provided for compatibility with custom merge tool commands and has the same value as `$LOCAL`. +-g:: +--gui:: + When 'git-difftool' is invoked with the `-g` or `--gui` option + the default diff tool will be read from the configured + `diff.guitool` variable instead of `diff.tool`. + See linkgit:git-diff[1] for the full list of supported options. CONFIG VARIABLES @@ -68,6 +74,9 @@ difftool equivalents have not been defined. diff.tool:: The default diff tool to use. +diff.guitool:: + The default diff tool to use when `--gui` is specified. + difftool..path:: Override the path for the given tool. This is useful in case your tool is not in the PATH. -- cgit v1.2.1 From 1c6f5b52b7b13bbc6cf404cb5ef9e64fda37655c Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Sat, 9 Jan 2010 20:02:42 -0800 Subject: difftool: Allow specifying unconfigured commands with --extcmd git-difftool requires difftool..cmd configuration even when tools use the standard "$diffcmd $from $to" form. This teaches git-difftool to run these tools in lieu of configuration by allowing the command to be specified on the command line. Reference: http://article.gmane.org/gmane.comp.version-control.git/133377 Signed-off-by: David Aguilar Signed-off-by: Junio C Hamano --- Documentation/git-difftool.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt index a5bce6278..f67d2db76 100644 --- a/Documentation/git-difftool.txt +++ b/Documentation/git-difftool.txt @@ -58,6 +58,11 @@ is set to the name of the temporary file containing the contents of the diff post-image. `$BASE` is provided for compatibility with custom merge tool commands and has the same value as `$LOCAL`. +--extcmd=:: + Specify a custom command for viewing diffs. + 'git-difftool' ignores the configured defaults and runs + `$command $LOCAL $REMOTE` when this option is specified. + -g:: --gui:: When 'git-difftool' is invoked with the `-g` or `--gui` option -- cgit v1.2.1 From 3bdfd44309822d4a2c49d381999ad5cc7e61ed5f Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Sat, 9 Jan 2010 20:02:43 -0800 Subject: git-diff.txt: Link to git-difftool Signed-off-by: David Aguilar Signed-off-by: Junio C Hamano --- Documentation/git-diff.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index 0ac711230..723a64872 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -157,6 +157,10 @@ $ git diff -R <2> rewrites (very expensive). <2> Output diff in reverse. +SEE ALSO +-------- +linkgit:git-difftool[1]:: + Show changes using common diff tools Author ------ -- cgit v1.2.1 From f47f1e2ce8b4022113120b32decb4436341dc3aa Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Fri, 15 Jan 2010 14:03:43 -0800 Subject: difftool: Add '-x' and as an alias for '--extcmd' This adds '-x' as a shorthand for the '--extcmd' option. Arguments to '--extcmd' can be specified separately, which was not originally possible. This also fixes the brief help text so that it mentions both '-x' and '--extcmd'. Signed-off-by: David Aguilar Signed-off-by: Junio C Hamano --- Documentation/git-difftool.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt index f67d2db76..5c68cff90 100644 --- a/Documentation/git-difftool.txt +++ b/Documentation/git-difftool.txt @@ -7,7 +7,7 @@ git-difftool - Show changes using common diff tools SYNOPSIS -------- -'git difftool' [--tool=] [-y|--no-prompt|--prompt] [<'git diff' options>] +'git difftool' [] {0,2} [--] [...] DESCRIPTION ----------- @@ -58,6 +58,7 @@ is set to the name of the temporary file containing the contents of the diff post-image. `$BASE` is provided for compatibility with custom merge tool commands and has the same value as `$LOCAL`. +-x :: --extcmd=:: Specify a custom command for viewing diffs. 'git-difftool' ignores the configured defaults and runs -- cgit v1.2.1