Cygwin Git: The merge tool kdiff3 is not available -


i'm trying cygwin git installation working 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 result:

normal merge conflict ...   {local}: modified file   {remote}: modified file hit return start merge resolution tool (kdiff3): merge tool kdiff3 not available '~/kdiff3.sh' 

however, running

~/kdiff3.sh 

opens kdiff3 expected.

here's .gitconfig:

[diff]         tool = kdiff3 [merge]         tool = kdiff3 [mergetool "kdiff3"]         path = ~/kdiff3.sh         keepbackup = false         trustexitcode = false 

kdiff3.sh

#!/bin/sh result="" arg       if [[ "" != "$arg" ]] && [[ -e $arg ]];               out=`cygpath -wa $arg`       else         out=$arg       if [[ $arg == -* ]];                   out=$arg         else           out="'$arg'"       fi     fi     result=$result" "$out   done /cygdrive/c/program\ files\ \(x86\)/kdiff3/kdiff3.exe $result 

the wrap shell script not necessary. i'm using kdiff3 installed in windows , set folder in path , git in cygwin. if don't set path kdiff3 need give full path in cmd cmd = /cygdrive/c/apps/kdiff3/kdiff3 ...

[diff]     tool = kdiff3 [merge]     tool = kdiff3 [difftool "kdiff3"]     cmd = kdiff3 \"$(cygpath -wla $local)\" \"$(cygpath -wla $remote)\"     trustexitcode = false [mergetool "kdiff3"]     cmd = kdiff3 \"$(cygpath -wla $base)\" \"$(cygpath -wla $local)\" \"$(cygpath -wla $remote)\" -o \"$(cygpath -wla $merged)\"     keepbackup = false     trustexitcode = false [mergetool]     prompt = false [difftool]     prompt = false 

Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -