Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2010-12-14 12:18:35 +0300
committerJunio C Hamano <gitster@pobox.com>2010-12-17 00:01:36 +0300
commit4a689afb030c1cd5aa1c141db94bbf9dde42f05e (patch)
treee6cb1dd0c3149e47f6bc2187a51ade8057cdd35a /git-difftool--helper.sh
parent51baceeec4884c14ac8c77902ec6973ab36421ca (diff)
difftool: provide basename to external tools
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>
Diffstat (limited to 'git-difftool--helper.sh')
-rwxr-xr-xgit-difftool--helper.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-difftool--helper.sh b/git-difftool--helper.sh
index 524f5ea8ab..0594bf7ca5 100755
--- a/git-difftool--helper.sh
+++ b/git-difftool--helper.sh
@@ -49,6 +49,7 @@ launch_merge_tool () {
fi
if use_ext_cmd; then
+ export BASE
eval $GIT_DIFFTOOL_EXTCMD '"$LOCAL"' '"$REMOTE"'
else
run_merge_tool "$merge_tool"