Gmane
From: Jeff King <peff <at> peff.net>
Subject: Re: Bug report: .gitattributes: -diff Unset causes files to be reported as binaries
Newsgroups: gmane.comp.version-control.git
Date: 2009-07-02 17:05:08 GMT (35 weeks, 6 days, 7 hours and 23 minutes ago)
On Thu, Jul 02, 2009 at 01:12:28PM +0200, Paolo Bonzini wrote:

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