git difftool --dir-diff error in the presence of symlinks to directories
- From
- Ismail Badawi <ismail@badawi.io>
- Date
- Jun 17, 2015, 22:39 UTC
- Message-ID
- <CAFB4ZjUnhEMfjg9+sHrPp271e=V=yU_5QFHBbmPpWMkb72+ENw@mail.gmail.com>
Reproduce like this (using git 2.4.3):
git init mkdir foo touch foo/bar git add . git commit -m "Initial commit." ln -s foo link git add . git commit -m "Add link to foo." git difftool -d HEAD^ HEAD
That last command outputs:
fatal: Unable to hash /Users/isbadawi/test/link hash-object /Users/isbadawi/test/link: command returned error: 128
Briefly looking at the 'git difftool' source it looks like it uses the output of 'git diff --raw' and calls 'hash-object' on any object whose mode is nonzero, including symlinks.
I'm not sure what the right thing to do here is -- just thought I'd report this failure.
Thanks, Ismail