BC not running as Git diff/merge tool

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Abscissa
    Journeyman
    • Jul 2009
    • 11

    BC not running as Git diff/merge tool

    My environment:
    - Beyond Compare v4.0.7 Pro Linux
    - Debian testing 64-bit
    - Git v2.4.6
    - At the command line, running "bcompare" does successfully launch Beyond Compare.

    I followed the instructions at http://www.scootersoftware.com/suppo...b_vcs#gitlinux and my ~/.gitconfig looks like this:

    Code:
    [user]
    	name = [my name]
    	email = [my email]
    [push]
    	default = simple
    [core]
    	autocrlf = False
    [diff]
    	tool = bc3
    [difftool]
    	bc3 = trustExitCode
    [merge]
    	tool = bc3
    [mergetool]
    	bc3 = trustExitCode
    My project's .git/config contains nothing related to diff/merge or beyond compare.

    But when I run "git difftool some_file_in_my_project", nothing happens. No error message, no output to stdout/stderr, beyond compare does not run, and the exit code is 0.

    I tried replacing all the "bc3" with "bc", but it did not help.
  • chrestomanci
    Enthusiast
    • Jan 2008
    • 49

    #2
    I don't think your ~/.gitconfig is quite correct. I think you need to specify the command to start beyond compare. The relevant stanza of my ~/.gitconfig is:

    Code:
    [diff]
            tool = bc4
    [difftool]
            prompt = false
    [difftool "bc4"]
            trustExitCode = true
            cmd = `/usr/bin/bcompare $LOCAL $REMOTE`
    [merge]
            tool = bc4
    [merge "tool"]
            bc4 = trustExitCode
    [mergetool "bc4"]
            cmd = /usr/bin/bcompare "$PWD/$LOCAL" "$PWD/$REMOTE" "$PWD/$BASE" "$PWD/$MERGED"
            keepBackup = false
            trustExitCode = false
    The other thing I have though of, is that git diff will only show you something if there is a diff to show, otherwise it will silently exit. Are you sure that the file you are trying to diff is changed and not staged for commit? Does a plain old git diff produce any output?

    Comment

    • Abscissa
      Journeyman
      • Jul 2009
      • 11

      #3
      Originally posted by chrestomanci
      The other thing I have though of, is that git diff will only show you something if there is a diff to show, otherwise it will silently exit. Are you sure that the file you are trying to diff is changed and not staged for commit? Does a plain old git diff produce any output?
      Ahh, that was the problem. I didn't know that. And none of the files in the project were changed, so plain "git diff" and "git difftool" weren't doing anything either. Thanks.

      Comment

      Working...