6

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?

Jean-François Corbett
  • 37,420
  • 30
  • 139
  • 188
ramaadhitia
  • 303
  • 1
  • 12
  • Please use backticks for formatting commands, see http://meta.stackexchange.com/questions/22186/how-do-i-format-my-code-blocks for more information. – kgr Sep 14 '12 at 10:13
  • did you fill the `[diff]` and `[difftool "p4merge"]` sections? – CharlesB Sep 14 '12 at 10:59
  • did you ever solve this? I'm having the same issue. Works until i try with --cached or --staged parameter. – Giscard Biamby Aug 30 '13 at 18:08

1 Answers1

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 "$@"

Community
  • 1
  • 1
silver_mx
  • 828
  • 9
  • 16