[Insight-developers] git and binary files

Brad King brad.king at kitware.com
Tue Aug 31 16:09:25 EDT 2010


On 08/31/2010 03:52 PM, Matthew McCormick (thewtex) wrote:
> Would setting 'text' and 'diff' in .gitattributes
> ( http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html )
> after '*.cxx' ( http://github.com/Kitware/ITK/blob/master/.gitattributes
> ) fix the problem?

The 'text' attribute is meaningful only to Git 1.7.2 and higher.

There are two parts to this problem:

(1) Getting newline conversion to work.  The 'text' attribute affects this
but older Git versions will need the "crlf" attribute set instead.  Git
1.7.2 will recognize it for compatibility though.

(2) Getting diff output to show as text.  The 'diff' attribute handles
this.

Setting the attributes will work, but I prefer to avoid it and let
Git's heuristics work.

Is there a reason binary data has to be in a comment in the source file?

-Brad


More information about the Insight-developers mailing list