Announcement

Collapse
No announcement yet.

Can't get git difftool to work right

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't get git difftool to work right

    I'm using
    Code:
    git version 2.17.2 (Apple Git-113)
    and BC4. When I configure it as per the FAQ,
    Code:
    git difftool
    shows me the first file diff, but I can't get it to go to the next file. If I do the same thing I'd do with opendiff (ie. hit Cmd-Q), it closes the window but doesn't open another window with the next file diff.

    The FAQ says that for newer versions of Git, I should use
    Code:
    git config --global diff.tool bc3
    but installing the command line tools never installed anything called bc3 so that doesn't work. So instead I'm editing `~/.gitconfig` as per the instructions for older versions of Git.

  • #2
    Hello,

    "bc3" is an older keyword that Git recognized and would correctly call to Beyond Compare, while "bc" is a newer keyword they've added. I'd suggest switching to "bc". Using custom keywords can also work, but then more manual configuration lines and information are needed, while git 'knows' what "bc" is and does some of the configuration for you automatically. This text isn't the command line itself, but a git variable name that is then used to identify the tool definition.

    Install Command Line Tools adds "bcompare" and "bcomp" to your command line. You can test this by executing the program by typing just that text in Terminal to verify it can launch BC4. Git then uses these commands for launching as a difftool.

    Could you include your current .gitconfig sections for diff and difftool? This way we can take a look at what you have. Also, please make sure to fully shutdown any open instances of git to make sure it isn't applying a cached version of the .gitconfig, then re-launch the Terminal/Git Bash/app to pull in the current .gitconfig changes. You can post here, or email at support@scootersoftware.com (along with a link referencing this forum thread).
    Aaron P Scooter Software

    Comment


    • #3
      Same problem using "git config --global diff.tool bc" - it shows the diff on the first file using BC4, but then it doesn't go to the next file. That's the same result I get when I copy the config from https://www.scootersoftware.com/supp...?zz=kb_vcs_osx for "older versions of git" - it shows the diffs in the first file, then when you cmd-Q it doesn't bring up the next files.

      Comment


      • #4
        Hello,

        Could you post a complete version of the console log? When executing:
        git difftool
        it should prompt first for the first diff file that needs review with [Y/n], launch BC4, and then after closing BC4 the terminal continues to show a prompt for each next diff with another [Y/n] for each.

        I've retested with a default install of Git, and a blank gitconfig that only has added Name, Email, and ran:
        git config --global diff.tool bc
        Aaron P Scooter Software

        Comment


        • #5
          I don't get prompted, it just goes into the first file. Then I hit cmd-Q and nothing happens, it's still in the git difftool command line.

          Code:
          tomblin-mac:~/Developer/DQM_Platform/Development> git config --global diff.tool bc
          
          tomblin-mac:~/Developer/DQM_Platform/Development> git difftool HEAD^
          There is no console log to see.
          Code:
          tomblin-mac:~/Developer/DQM_Platform/Development> cat ~/.gitconfig
          
          [http]                                                                
          
              sslVslVerify = false                                                 
          
          [user]                                                               
          
              name = Paul Tomblin                                               
          
              email = paul.tomblin@adillc.net                                   
          
          [core]                                                                
          
              longpaths = true                                                  
          
              preloadindex = true                                               
          
              fscache = true                                                    
          
          [push]                                                                
          
              default = simple                                                  
          
          [pull]
          
              rebase = true
          
          [gc]                                                                  
          
              auto = 256                                                        
          
          [branch]                                                              
          
              autosetuprebase = always                                          
          
          [rebase]                                                              
          
              stat = true                                                       
          
              autoStash = true                                                  
          
          [alias]
          
          [diff]
          
              tool = bc
          
          [difftool]
          
              prompt = false
          
          [winUpdater]
          
              recentlySeenVersion = 2.18.0.windows.1
          
          [alias]
          
              lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
          
          
          tomblin-mac:~/Developer/DQM_Platform/Development>

          Comment


          • #6
            Hello,

            The issue is a combination of No Prompt and Quit Application (Apple+Q). Instead, if you Close Window (Apple+W) or close the tab, the task continues to call the additional diffs.

            If Prompts are enabled, then the Terminal responds after Quit and prompts for the next task.

            I'll open a tracker entry to investigate is this is git behavior we can work around.
            Aaron P Scooter Software

            Comment


            • #7
              Ah, right you are! Thank you.

              Comment

              Working...
              X