Is there a GUI difftool that does symlinks?

Let's say I have some directories with symlinks in them.

.
├── dirA
│   ├── file013
│   └── file212
└── dirB
    ├── file013
    └── file212

2 directories, 4 files

The symlinks are pointing to directories with lots of files and directories that I don't care about, so I've used symlinks to isolate them. I can edit them just fine, for example, and the changes are done on the actual files.

I want to compare say A.file013 <> B.file013

Oh, I and I mostly work from the terminal, so looking for

$ awesome_diff dirA/file013 dirB/file013 : diff 1 file pair

  • opendiff/Filemerge does do this, actually. ✅ so does ksdiff/Kaleidoscope.

and

$ awesome_diff dirA dirB : diff at directory level.

  • compare directory contents, drill down into directories, drill down into individual file diffs....

    • opendiff/Filemerge fails this ❌ as it will then consider only the symlinks' own pointers. ksdiff/Kaleidoscope also ❌

(still appreciate GUI-only answers)

good:

  • Gnu diff : does a fine job, but terminal-only. Most GUI diff tools provide line by line copy functionality.

bad:

  • Apple Filemerge/opendiff compares symlink file pointers, not file contents. actually, if you launch Filemerge, the GUI, from the start it does work, but the command line opendiff calls the Filemerge incorrectly.

  • Kaleidoscope - file type (symlink) not supported

unknown/install issues:

  • Kdiff3 - compares, but otherwise broken at 0.998 release, the menu doesn't work at all for example.
  • Meld - haven't gotten it to work on macos yet.
  • Diffmerge - haven't gotten it to work on macos yet.

env: Mojave


Solution 1:

Both Filemerge and opendiff work with symlinks, so

opendiff symlink-to-foo symlink-to-bar

will open Filemerge and compare foo vs bar .