Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Posts
    9

    Default 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.

  2. #2
    Join Date
    Jan 2008
    Posts
    49

    Default

    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?

  3. #3
    Join Date
    Jul 2009
    Posts
    9

    Default

    Quote Originally Posted by chrestomanci View Post
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •