git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frans Englich <fenglich@fastmail.fm>
To: Paolo Bonzini <bonzini@gnu.org>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: Bug report: .gitattributes: -diff Unset causes files to be reported as binaries
Date: Thu, 2 Jul 2009 13:29:04 +0200	[thread overview]
Message-ID: <200907021329.04258.fenglich@fastmail.fm> (raw)
In-Reply-To: <4A4C961C.6090503@gnu.org>

On Thursday 02 July 2009 13:12:28 Paolo Bonzini wrote:
> >> So as far as I can see, git is behaving exactly as it is supposed to.
> >> Maybe you can be more specific about what effect you were trying to
> >> achieve by setting gitattributes in the first place?
> >
> > 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
>
> > If -diff affects whether a file is treated as a binary, as opposed
> > whether it's diff'ed, it would imo make sense to call it -binary.
>
> No, diff affects how a file is diffed.  The particular setting "-diff"
> diffs the file as if it was binary.

Aha, then we're maybe at conclusion; if -diff doesn't cause the files to be 
treated as binaries, then the phrase "Binary files a/file.txt and b/file.txt 
differ" is wrong, it shouldn't read "Binary files", but maybe rather "The 
files".


Cheers,

		Frans

  reply	other threads:[~2009-07-02 11:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01 10:08 Bug report: .gitattributes: -diff Unset causes files to be reported as binaries Frans Englich
2009-07-02  5:35 ` Jeff King
2009-07-02  8:14   ` Frans Englich
2009-07-02 11:12     ` Paolo Bonzini
2009-07-02 11:29       ` Frans Englich [this message]
2009-07-02 11:29         ` Paolo Bonzini
2009-07-02 17:05       ` Jeff King
2009-07-02 11:59     ` Jakub Narebski
2009-07-02 17:04     ` Jeff King
2009-07-02 14:29 ` René Scharfe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200907021329.04258.fenglich@fastmail.fm \
    --to=fenglich@fastmail.fm \
    --cc=bonzini@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).