Beyond Compare 4 failing as git difftool on OSX when already running

2.6k Views Asked by At

I've recently switched to using Beyond Compare as my git difftool/mergetool on OSX. It works fine when Beyond Compare is not already running - git difftool A B works as expected with A appearing in the left pane and B appearing in the right pane.

However, if a Beyond Compare session is already open, the same command results in the left page displaying /Applications/Beyond Compare.app/Contents/Info.plist and the right pane being blank. This is pretty annoying as I have to quit BC entirely in order for the next difftool session to work correctly and I'm also using BC as an SFTP client to sync files with a remote server.

I'm using Beyond Compare 4.1.2, git 2.6.3, OSX 10.11

The relevant section of my ~/.gitconfig (taken from Scooter Software):

[diff]
    tool = bcomp
[difftool]
    prompt = false
[difftool "bcomp"]
    trustExitCode = true
    cmd = "/usr/local/bin/bcomp" "$LOCAL" "$REMOTE"
[merge]
    tool = bcomp
[mergetool]
    prompt = false
    keepBackup = false
[mergetool "bcomp"]
    trustExitCode = true
    cmd = "/usr/local/bin/bcomp" "$LOCAL" "$REMOTE" "$BASE" "$MERGED"

where /usr/local/bin/bcomp -> /Applications/Beyond Compare.app/Contents/MacOS/bcomp

Can anyone suggest a solution?

2

There are 2 best solutions below

0
On

Try the updated instructions from Scooter Software's knowledge base.

Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.

Diff

git config --global diff.tool bc3

To launch a diff using Beyond Compare, use the command: git difftool file.ext

Merge (Pro only)

git config --global merge.tool bc3
git config --global mergetool.bc3 trustExitCode true

To launch a 3-way merge using Beyond Compare, use the command: git mergetool file.ext

I tested the above instructions using BC 4.1.3, OS X 10.11, and Git 2.5.4 and launching two "git difftool file.ext" from separate terminals opened in Beyond Compare without issue.

Reference: Using Beyond Compare with Version Control Systems under OS X

0
On

I had to additionally open BC4 and go to Session Settings > Handling and

  1. Turn ON Follow Symbolic Links checkbox
  2. At bottom left, the dropdown with Use for this view only set to Also update session defaults

from this scooter support thread: https://www.scootersoftware.com/vbulletin/forum/beyond-compare-4-discussion/mac/11149-git-difftool-dir-diff-not-working-with-bc4-on-os-x