p4merge displays error 'nul is (or points to) an invalid file' when I am using git difftool --cached
Asked Answered
A

1

7

I just decided and installed p4merge as my visual merge tool for git. In order to do that I've configured my git using this command

git config --global merge.tool p4merge
git config --global mergetool.p4merge.cmd 'p4merge $BASE $LOCAL $REMOTE $MERGED'

And then I tested them and ran git difftool command and it worked just fine. but when I ran git difftool --cached, p4merge displayed an error message:

nul is (or points to) an invalid file

I also tried to follow the instructions in this blog, but I couldn't resolve the problem.

By the way I use git & p4merge on windows 7. Does anyone know the solution to this problem?

Aaberg answered 9/9, 2012 at 10:1 Comment(3)
Please use backticks for formatting commands, see meta.stackexchange.com/questions/22186/… for more information.Underhanded
did you fill the [diff] and [difftool "p4merge"] sections?Foggy
did you ever solve this? I'm having the same issue. Works until i try with --cached or --staged parameter.Equilateral
A
0

It is hard to say based on the given information, but I had the same issue due to whitespaces in the file under comparison. I use Linux instead, and I fixed it thanks to this post:

Just search for: bar "$@"

Anchoveta answered 23/9, 2015 at 10:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.