Upgrading Perforce p4merge on Mac OS X Mojave

Upgrading Perforce p4merge on Mac OS X Mojave

I recently upgraded to Mac OS X Mojave and have been enjoying it quite a bit. Well until I had an issue with `git mergetool`. p4merge stopped working with git. When I would run the command I got the window for manually merging files. The worst thing was that it seemed like no one was experiencing this issue. Google was failing me. Luckily I figured it out.

I was using these versions at the time:

  • git version 2.19.1
  • Mojave 10.14 (18A391)
  • Rev. P4Merge/MACOSX1013X86_64/2018.3/1706936

The command I was using to get it to work pre-Mojave was this:

[mergetool "p4merge"]
  cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "\"$PWD/$BASE\"" "\"$PWD/$REMOTE\"" "\"$PWD/$LOCAL\"" "\"$PWD/$MERGED\""

This works: I changed from using the shim to using the app directly.

[mergetool "p4merge"]
  cmd = /Applications/p4merge.app/Contents/MacOS/p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
Note that in the p4merge docs they say you can use $* with the shim. I wasn't able to get it working and I am guessing it is because $* isn't passing the arguments in the way they expect.

I'd like to know why it stopped working but they don't have help commands on their shim from what I can tell.