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

Bug report: .gitattributes: -diff Unset causes files to be reported as binaries

From
Frans Englich <fenglich@fastmail.fm>
Date
Jul 1, 2009, 10:08 UTC
Message-ID
<200907011208.35397.fenglich@fastmail.fm>
Hi,

Applying -diff Unset to a file using .gittattributes causes "git diff" to state that the file is a binary even though it isn't, or have been instructed to be treated as one. See attached script for reproducing.

This causes confusion since the file isn't a binary, it's only the diff output that has been suppressed. For instance, an auto generated cpp file has -diff Unset applied to it to suppress the meaningless output, but people contact you to point out the file is binary.

Perhaps this is easy to fix, a question of changing message strings.
Cheers,
		Frans
Next: Jeff King
Message 1 of 10 in “Bug report: .gitattributes: -diff Unset causes files to be reported as binaries”
  1. Frans EnglichJul 1, 2009
  2. Jeff KingJul 2, 2009
  3. Frans EnglichJul 2, 2009
  4. Paolo BonziniJul 2, 2009
  5. Frans EnglichJul 2, 2009
  6. Paolo BonziniJul 2, 2009
  7. Jeff KingJul 2, 2009
  8. Jakub NarebskiJul 2, 2009
  9. Jeff KingJul 2, 2009
  10. René ScharfeJul 2, 2009

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.