summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 51bacee)
raw | patch | inline | side by side (parent: 51bacee)
author | Michael J Gruber <git@drmicha.warpmail.net> | |
Tue, 14 Dec 2010 09:18:35 +0000 (10:18 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 16 Dec 2010 21:01:36 +0000 (13:01 -0800) |
Currently, only configured diff helpers get the basename of the file
being compared. Tools specified with "git difftool -x" only get the
names of temporary files for the different versions.
Export BASE so that an external tool can read the name from the
environment. Rather than using a third argument, this avoids breaking
existing scripts which may somewhat carelessly be using "$@" rather than
"$1" "$2".
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
being compared. Tools specified with "git difftool -x" only get the
names of temporary files for the different versions.
Export BASE so that an external tool can read the name from the
environment. Rather than using a third argument, this avoids breaking
existing scripts which may somewhat carelessly be using "$@" rather than
"$1" "$2".
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-difftool.txt | patch | blob | history | |
git-difftool--helper.sh | patch | blob | history |
index 498b1610f46ce7a4778c0e76f36d212d2a605fae..573843211112a6efb7b296bbc5b11894c01dd8cd 100644 (file)
Specify a custom command for viewing diffs.
'git-difftool' ignores the configured defaults and runs
`$command $LOCAL $REMOTE` when this option is specified.
+ Additionally, `$BASE` is set in the environment.
-g::
--gui::
index 524f5ea8ab14bb44e5a8e6393e40c0ec5c1ddaa2..0594bf7ca54c6b91d5f96dd86d8962e93459d004 100755 (executable)
--- a/git-difftool--helper.sh
+++ b/git-difftool--helper.sh
fi
if use_ext_cmd; then
+ export BASE
eval $GIT_DIFFTOOL_EXTCMD '"$LOCAL"' '"$REMOTE"'
else
run_merge_tool "$merge_tool"