This website requires JavaScript.
Explore
Help
Sign In
development
/
git
Watch
1
Star
0
Fork
You've already forked git
0
mirror of
https://github.com/git/git
synced
2024-08-27 11:39:22 +00:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
4ecbc65fa7
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 03:34:34 +00: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 10:42:53 +00:00
*.[ch] whitespace=indent,trail,space
Reference in a new issue
Copy permalink