According to doc and various answers here git difftool will invoke the specified executable (usually a shell script) with environment variables LOCAL and REMOTE set to the file paths. But when I try, LOCAL and REMOTE are not set. I've tried the following test:
git config --global diff.tool mytest
git config --global difftool.mytest.cmd mytest.sh
git config --global difftool.prompt false
with mytest.sh:
#!/bin/sh
echo "LOCAL:$LOCAL REMOTE:$REMOTE"
invoking:
git difftool --tool mytest <commitid> -- <path-to-file>
output:
LOCAL: REMOTE:
Any suggestions?