Symlink issue with git difftool --dir-dif

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DEinspanjer
    Enthusiast
    • Nov 2007
    • 28

    Symlink issue with git difftool --dir-dif

    Using the recommended .gitconf settings from sticky threads on OSX.

    When I tried to diff a branch in git to master:
    $ git checkout mybranch
    $ git difftool --dir-dif master

    BC aligned the directories, but within the directories, all the files on the right hand side (the current files from mybranch) were symlinks, and they did not align with the non-symlink files on the left hand side.

    I was able to work around this by passing the --no-symlinks argument to difftool, but would be handy to work with symlinks if the names are the same.
  • Aaron
    Team Scooter
    • Oct 2007
    • 15995

    #2
    Hello,

    Is the --no-symlinks a git option? I wasn't familiar with this one.

    Within BC4, you can configure it to follow symlinks by default. On the Home screen, expand the New folder, right click and Edit the Folder Compare. Here, go to the Handling tab, enable Follow symbolic links, then Save. This will then be in effect for future Folder Compare sessions. Would this be a better solution for compatibility with Git?
    Aaron P Scooter Software

    Comment

    • DEinspanjer
      Enthusiast
      • Nov 2007
      • 28

      #3
      Yeah, I found it as an argument to git difftool when you use the --dir-dif option. So, this is the command that worked for me in my example above, without having to change my .gitconf:

      $ git difftool --dir-dif --no-symlink master

      Comment

      • banzaimonkey
        Visitor
        • Apr 2011
        • 8

        #4
        Originally posted by Aaron
        Hello,

        Is the --no-symlinks a git option? I wasn't familiar with this one.

        Within BC4, you can configure it to follow symlinks by default. On the Home screen, expand the New folder, right click and Edit the Folder Compare. Here, go to the Handling tab, enable Follow symbolic links, then Save. This will then be in effect for future Folder Compare sessions. Would this be a better solution for compatibility with Git?
        This worked for me, and I also found the "expand folders with differences" option I was looking for, but this is a really awkward place to hide these settings. I was expecting to find them in the Preferences panel (CMD+,).

        After changing the settings this works for me:

        git difftool -d

        Comment

        • Aaron
          Team Scooter
          • Oct 2007
          • 15995

          #5
          Hello,

          The Preferences panel is reserved for global options (and where changing any option here will then effect any future use of the application).

          Session Settings are session specific. Changing one does not change any other sessions, and setting a new default does not update any previously saved sessions. We created a video awhile back for BC3, and haven't had a chance to update it yet for BC4, but it explains this concept in a bit more detail:
          http://www.scootersoftware.com/videos/WN3Options.html

          Please let us know if you have any questions.
          Aaron P Scooter Software

          Comment

          • banzaimonkey
            Visitor
            • Apr 2011
            • 8

            #6
            Thanks for the clarification, Aaron. I'd forgotten this workflow from BC3.

            Comment

            Working...