Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2014
    Posts
    2

    Default bc4 not recognized as git difftool

    Greetings,

    After following the vcs guide, I attempted to set bc4 pro as my git diff/merge tools using the following:

    Code:
    git config --global merge.tool bc4
    git config --global merge.tool.bc4 trustExitCode true
    
    git config --global diff.tool bc4
    git config --global diff.tool.bc4 trustExitCode true
    When attempting a diff/merge though I get:
    Code:
    git config option diff.tool set to unknown tool: bc4
    Anybody get this to work with bc4? Thanks for the help!

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,949

    Default

    Hello,

    BC4 is still in beta and the text in the VCS guide specifically uses the text "bc3" because Git can detect and use an install of BC3. Git has not yet added this support for BC4, so we will probably need to use the "for older versions of Git" directions to define BC4's location.
    Aaron P Scooter Software

  3. #3
    Join Date
    Mar 2014
    Posts
    2

    Default

    Gotcha, the only line in your guide that threw me off was, "Beyond Compare version 4 users should replace "3" with "4" appropriately." at the top. Hence my attempt at using bc4 for the Git 1.8+ instructions (I'm running 1.8.3.2).

    For those interested, I did get it to work thanks to guidance from gitdoc chapter on customization. Essentially I defined my diff and merge tools as "bc4" then for each added a custom command where I call bcompare from its /usr/bin location and pass the appropriate arguments. See the snippet of my config file below:
    Code:
    [diff]
            tool = bc4
    [difftool]
            prompt = false
    [difftool "bc4"]
            trustExitCode = true
            cmd = `/usr/bin/bcompare $LOCAL $REMOTE`
    [merge]
            tool = bc4
    [mergetool]
            prompt = false
    [mergetool "bc4"]
            trustExitCode = true
            cmd = `/usr/bin/bcompare $LOCAL $REMOTE $BASE $MERGED`
    (EDIT: I now see that your Git 1.7.x and older instructions are similar, I just didn't use wrapper approach)
    Last edited by dailyherold; 20-Mar-2014 at 02:13 AM.

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,949

    Default

    Good catch on the documentation. We may have to update that (or hope Git updates with added BC4 support soon!)

    I may also grab this snippet and place it in our Git instructions.
    Aaron P Scooter Software

  5. #5
    Join Date
    Apr 2014
    Posts
    1

    Default caught out...

    BTW,

    I also got caust by this one, the docs saying "just replace 3 with 4".

    I setup git to use the "bc3" tool but pointed the path the BC4. Will just update when git tool list is updated...

    Thank, PK

  6. #6
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,949

    Default

    Our current documentation in the Git for Linux section does note to use the older method below, but if using "bc3" also works for you that is great. At some point down the road, hopefully git will be updated with "bc4" text, so the directions won't need to be quite as complicated.
    Aaron P Scooter Software

  7. #7
    Join Date
    Jul 2014
    Posts
    1

    Default Tip: alias works for mr

    alias bc3=/usr/bin/bcompare

  8. #8
    Join Date
    Aug 2009
    Location
    Lexington, MA
    Posts
    6

    Default

    Quote Originally Posted by karlnospam View Post
    alias bc3=/usr/bin/bcompare
    I got it to work with the alias, but now if I have several files, they are opened one after the other in separate BC4 sessions. I wanted each to be in its own tab.

    I think this requires a combination of the alias trick and the settings above, but I haven't gotten much further in my experimenting. I can get each diff to load into a separate tab, but in some cases the path to the baseline is garbled. The use case was git difftool master^.

    Any update on whether git plans to support a bc4 arg?

    Thanks.
    Last edited by ojcitt; 23-Mar-2016 at 12:51 PM.

  9. #9
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,949

    Default

    Hello,

    Git passes the file pairs one at a time, but you may be able to configure a folder level diff which would show all of the different files. You can then navigate through the folder compare, clicking and opening individual file comparisons in their own tabs:
    http://theo.im/blog/2012/10/27/direc...-git-difftool/

    In the Session Settings dialog, Handling tab, you'll need to also enable the Follow Symbolic Links option.
    Aaron P Scooter Software

Posting Permissions

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