summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c6720cf)
raw | patch | inline | side by side (parent: c6720cf)
author | Nanako Shiraishi <nanako3@lavabit.com> | |
Fri, 19 Jun 2009 10:42:53 +0000 (19:42 +0900) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 21 Jun 2009 17:42:37 +0000 (10:42 -0700) |
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>
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>
.gitattributes | patch | blob | history |
diff --git a/.gitattributes b/.gitattributes
index 6b9c715d21d5486e59083fb6071566aa6ecd4d42..0636deea9357d2f1e9331119f02fb75fb6b15393 100644 (file)
--- a/.gitattributes
+++ b/.gitattributes
* whitespace=!indent,trail,space
-*.[ch] whitespace
+*.[ch] whitespace=indent,trail,space