Git Difftool Meld not working in Baboon

I am currently setting up Meld difftool to work in Babun using the following commands:

git config --global diff.tool meld
git config --global difftool.prompt false
git config --global difftool.meld.path "/cygdrive/c/Program\ Files\ \(x86\)/Meld/Meld.exe"
git config --global difftool.meld.cmd '/cygdrive/c/Program\ Files\ \(x86\)/Meld/Meld.exe $LOCAL $REMOTE'

This works, and Meld opens with two files at startup

git difftool HEAD HEAD^

However, the second file (from the remote) does not open, and I get

There was a problem opening the file "\tmp\xxx_FILENAME.EXTENSION"

However, when I run diffftool from git bash, it works. Is there something wrong with my setup?

+4
source share
1 answer

The problem was accessing temporary files from Cygwin. Since Cygwin has its own drives, I had to use it cygpathto format file paths. Full setup is given below:

git config --global diff.tool meld
git config --global difftool.prompt false
git config --global difftool.meld.path "c:\Program Files (x86)\Meld\Meld.exe"
git config --global difftool.meld.cmd 'c:/Program\ Files\ \(x86\)/Meld/Meld.exe "$(cygpath -w "$LOCAL")" "$(cygpath -w "$REMOTE")"'
+4
source

Source: https://habr.com/ru/post/1668613/


All Articles