My git diff configuration is:
mark@L-R910LPKW:~/.kube$ git config --list | grep diff
diff.tool=bc3
diff.guitool=bc3
difftool.prompt=false
difftool.bc3.path=/mnt/c/Program Files/Beyond Compare 4/BComp.com
mark@L-R910LPKW:~/.kube$
When I run git difftool
from WSL I get something like this:
Obviously when I run git diff
I see the expected output on the console.
Now, according to ps
the actual command line is /tools/init /mnt/c/Program Files/Beyond Compare 4/BComp.com /tmp/maHQTa_config config
So it looks like config
was successfully translated to a WSL full path "understood" outside of WSL – \wsl.localhostUbuntu-20.04homemark.kubeconfig. However, not so for /tmp/maHQTa_config, even though it maps to \wsl.localhostUbuntu-20.04tmpmaHQTa_config
How this can be fixed if at all?
EDIT 1
Even though I only showed the git configuration for the diffing, I have merging covered as well:
mark@L-R910LPKW:~/.kube [master ? +1 ~1 -0 !]$ git config --list | grep merge
merge.tool=bc3
merge.guitool=bc3
mergetool.prompt=false
mergetool.keepbackup=false
mergetool.bc3.path=/mnt/c/Program Files/Beyond Compare 4/BComp.com
mark@L-R910LPKW:~/.kube [master ? +1 ~1 -0 !]$
2
Answers
try to use :
then add the path for the bc3 tool :
To get around this Windows annoyance, I wound up writing a quickie program to translate the file args.
I use the Windows p4merge.exe as my mergetool, but this should work for bc3 or just about anything.
(I’m running Ubuntu under WSL 2 under Win 10. This code might need some small changes if you’re running a different version. I notice that for me, WSL files translate to Wsl$… but for you it’s Wsl.localhost)