I'm trying to get my cygwin git installation working with kdiff3.
I followed Noam Lewis' instructions here: http://noamlewis.wordpress.com/2011/03/22/how-to-use-kdiff3-as-a-difftool-mergetool-with-cygwin-git/
But it's not working :(
Running
git mergetool -t kdiff3
Gives this result:
Normal merge conflict for ...
{local}: modified file
{remote}: modified file
Hit return to start merge resolution tool (kdiff3):
The merge tool kdiff3 is not available as '~/kdiff3.sh'
However, running
~/kdiff3.sh
Opens kdiff3 as expected.
Here's my .gitconfig:
[diff]
tool = kdiff3
[merge]
tool = kdiff3
[mergetool "kdiff3"]
path = ~/kdiff3.sh
keepBackup = false
trustExitCode = false
kdiff3.sh
#!/bin/sh
RESULT=""
for arg
do
if [[ "" != "$arg" ]] && [[ -e $arg ]];
then
OUT=`cygpath -wa $arg`
else
OUT=$arg
if [[ $arg == -* ]];
then
OUT=$arg
else
OUT="'$arg'"
fi
fi
RESULT=$RESULT" "$OUT
done
/cygdrive/c/Program\ Files\ \(x86\)/KDiff3/kdiff3.exe $RESULT