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

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

From
Jeff King <peff@peff.net>
Date
Jul 2, 2009, 17:05 UTC
Message-ID
<20090702170508.GB15802@sigio.peff.net>
In-Reply-To
<4A4C961C.6090503@gnu.org>
On Thu, Jul 02, 2009 at 01:12:28PM +0200, Paolo Bonzini wrote:
Show 10 quoted lines
> >To exclude it in diffs, such as from `git show`. Take the case where you have
> >a grammar file for a parser and generate a source file from it(or any similar
> >scenario); the diff for the generated source file is not of interest and is
> >just noisy when read as part of a patch. This applies to all kinds of
> >generated files. However, this doesn't mean that the file should be treated
> >as a binary, and what practicalities that implies.
> 
> I am not sure it is a good idea, but you can do this with
> 
> FILE diff=/bin/true

This is a good idea Paolo (and I stole it when responding elsewhere in the thread ;) ), but it should actually be:

  FILE diff=invisible
and then putting
   [diff "invisible"]
     command = /bin/true
in your config.
-Peff
Previous: Paolo BonziniNext: Jakub Narebski
Message 7 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.