git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git difftool --dir-diff error in the presence of symlinks to directories

From
IBIsmail 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

Next: David Aguilar
Message 1 of 2 in “git difftool --dir-diff error in the presence of symlinks to directories”
  1. Ismail BadawiJun 17, 2015
  2. David AguilarJun 22, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.