@matheusbsbs / matheus-bagliano / commits / e2f6331a14
Fork 0

.gitattributes: CR at the end of the line is an error

When a CR is accidentally added at the end of a C source file in the git project tree, "git diff --check" doesn't detect it as an error. $ echo abQ | tr Q '\015' >>fast-import.c $ git diff --check I think this is because the "whitespace" attribute is set to *.[ch] files without specifying what kind of errors are caught. It makes git "notice all types of errors" (as described in the documentation), but I think it is incorrectly setting cr-at-eol, too, and hides this error. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nanako Shiraishi committed Jun 19, 2009 at 19:42 UTC e2f6331a14213f01a6e68e71ed63c77323a3e759
1 file changed +1 -1
.gitattributes
+1 -1
@@ -1,2 +1,2 @@
1 * whitespace=!indent,trail,space
2 -*.[ch] whitespace
2 +*.[ch] whitespace=indent,trail,space