Для этого сайта требуется поддержка JavaScript.
Обзор
Помощь
Регистрация
Вход
microsoft
/
git
зеркало из
https://github.com/microsoft/git.git
Следить
1
В избранное
0
Форкнуть
Вы уже форкнули git
0
Код
Задачи
Пакеты
Проекты
Релизы
Вики
Активность
b4479f0747
git
/
.gitattributes
3 строки
70 B
Plaintext
Исходник
Обычный вид
История
Убрать экранирование
Экранировать
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 06:34:34 +03: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 14:42:53 +04:00
*.[ch] whitespace=indent,trail,space