# Marking file as non-binary

2 messages from 2011-02-02 to 2011-02-02. Participants: Maaartin, Matthieu Moy.
Thread: https://gitlist.dev/t/26388

## Maaartin, 2011-02-02 14:57

Subject: Marking file as non-binary
Message-ID: <iibrce$a8g$1@dough.gmane.org>
URL: https://gitlist.dev/e/iibrce%24a8g%241%40dough.gmane.org

```
For whatever reason, git claims that my foo.cpp (c++ source) is binary,
which means I see no diff when doing git log -p. I already tried putting

*.cpp diff=true text=true

in .gitattributes in maybe 20 different variations, but it doesn't help
at all. I've checked the filename for typos, etc. Today is a day when
really nothing works here.

```

## Matthieu Moy, 2011-02-02 15:05

Subject: Re: Marking file as non-binary
Message-ID: <vpqtygm8ok8.fsf@bauges.imag.fr>
URL: https://gitlist.dev/e/vpqtygm8ok8.fsf%40bauges.imag.fr
In-Reply-To: <iibrce$a8g$1@dough.gmane.org>

```
Maaartin <grajcar1@seznam.cz> writes:

> For whatever reason, git claims that my foo.cpp (c++ source) is
> binary,

There is probably a null character in your source ('\0'). You usually
don't want that, regardless of Git.

> *.cpp diff=true text=true

*.cpp diff

works for me. Otherwise, "git log -p -a".

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

```
