git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Matthieu Vachon <matthieu.o.vachon@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: .gitattributes and defaulting to binary
Date: Mon, 16 Sep 2013 18:09:08 -0400	[thread overview]
Message-ID: <20130916220908.GC5477@sigill.intra.peff.net> (raw)
In-Reply-To: <CAOTvmonjWtUM42ATpEu+s6GVcpTO10BT0izXVB_aqK2npgRfWQ@mail.gmail.com>

On Mon, Sep 16, 2013 at 05:35:24PM -0400, Matthieu Vachon wrote:

> But I was not able to achieve it right now. When having this in my
> `.gitattributes`, git treats all files as binary, even the one
> explicitly specified like `*.txt`:
> 
>     *.txt text
>     * binary

>From "git help attributes":

  When more than one pattern matches the path, a later line overrides an
  earlier line. This overriding is done per attribute.

Reversing the two lines should do what you want.

You may also want to use "-text" instead of "binary"; the latter also
implies "-diff", which means you will never see diffs of those files,
even if they are actually text.

-Peff

      reply	other threads:[~2013-09-16 22:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-16 21:35 .gitattributes and defaulting to binary Matthieu Vachon
2013-09-16 22:09 ` Jeff King [this message]

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=20130916220908.GC5477@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=matthieu.o.vachon@gmail.com \
    /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).