threads / discuss / 26388

Marking file as non-binary

Subject: Marking file as non-binary

## tl;dr

2 messages between Feb 2, 2011 and Feb 2, 2011.

replies: 1people: 2as markdown or json

Maaartin· Feb 2, 2011, 14:57 UTC · lore

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· Feb 2, 2011, 15:05 UTC · re: Maaartin · lore

Re: Marking file as non-binary

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/

← back to recent threads