Skip to contentSkip to conversation

Marking file as non-binary

DISCUSSION Maaartin 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore

Maaartin

author
#0 lore raw

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.

#1 lore raw
Quoted 2 lines · Maaartin

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.

Quoted 1 line

*.cpp diff=true text=true

*.cpp diff

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

Signature · 2 lines
Matthieu Moy
http://www-verimag.imag.fr/~moy/