I use Windows 10 Ubuntu bash, provided by Windows Subsystem for Linux. I want to use a visual diff/merge tool for git. I installed p4merge on Windows (followed this artice) and configured the git .gitconfig
file with the following way (I adjusted the paths to be accessible from Windows 10 Ubuntu bash):
[merge]
tool = p4merge
[mergetool "p4merge"]
path = /mnt/c/Program Files/Perforce/p4merge.exe
[mergetool]
prompt = false
[diff]
tool = p4merge
[difftool "p4merge"]
path = /mnt/c/Program Files/Perforce/p4merge.exe
[difftool]
prompt = false
Additionally, I added the following folder to the bash PATH
variable in .bashrc
to make it callable from anywhere:
export PATH=$PATH:"/mnt/c/Program Files/Perforce"
So my problem is that if I call git difftool
in the bash - to investigate the changes with p4merge
- I got the following messages
- in bash:
Unable to translate current working directory. Using C:\Windows\system32
. - the
p4merge
application is started right after the call but gives the following message:Error: ... point to an invalid file
.
If I understand right, this problem may emanate from the fact that a Windows program (namely p4merge
) could not find a file that is referenced with a Linux file path (e.g. /mnt/c/..
).
Is there any way to solve this kind of problem? (Maybe it is a more general problem: using Linux path from Windows application.)
Anyway, I do not insist on using p4merge
but any similar visual tool to compare differences and to make merge possible.
Any information you can provide me would be greatly appreciated.