This website requires JavaScript.
Explore
Help
Register
Sign In
mirrors
/
git
Watch
0
Star
0
Fork
0
You've already forked git
mirror of
https://github.com/git/git.git
synced
2024-11-27 12:03:55 +08:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
e2f8617b26
git
/
.gitattributes
3 lines
70 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Define the project whitespace policy This establishes what the "bad" whitespaces are for this project. The rules are: - Unless otherwise specified, indent with SP that could be replaced with HT are not "bad". But SP before HT in the indent is "bad", and trailing whitespaces are "bad". - For C source files, initial indent by SP that can be replaced with HT is also "bad". - Test scripts in t/ and test vectors in its subdirectories can contain anything, so we make it unrestricted for now. Anything "bad" will be shown in WHITESPACE error indicator in diff output, and "apply --whitespace=warn" will warn about it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-11 11:34:34 +08:00
* whitespace=!indent,trail,space
.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>
2009-06-19 18:42:53 +08:00
*.[ch] whitespace=indent,trail,space
Reference in New Issue
Copy Permalink