author | Junio C Hamano <gitster@pobox.com> | |
Fri, 2 Nov 2007 07:24:27 +0000 (00:24 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 3 Nov 2007 00:58:08 +0000 (17:58 -0700) | ||
commit | a9cc857ada7c57069ff00eed8d0addcf55849f39 | |
tree | 38bd0078333697cc9252189b7bf58a01d7bb3c15 | tree | snapshot |
parent | e3d6d56f1c2097f13a427e158638e5e0918e5705 | commit | diff |
War on whitespace: first, a bit of retreat.
This introduces core.whitespace configuration variable that lets
you specify the definition of "whitespace error".
Currently there are two kinds of whitespace errors defined:
* trailing-space: trailing whitespaces at the end of the line.
* space-before-tab: a SP appears immediately before HT in the
indent part of the line.
You can specify the desired types of errors to be detected by
listing their names (unique abbreviations are accepted)
separated by comma. By default, these two errors are always
detected, as that is the traditional behaviour. You can disable
detection of a particular type of error by prefixing a '-' in
front of the name of the error, like this:
[core]
whitespace = -trailing-space
This patch teaches the code to output colored diff with
DIFF_WHITESPACE color to highlight the detected whitespace
errors to honor the new configuration.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This introduces core.whitespace configuration variable that lets
you specify the definition of "whitespace error".
Currently there are two kinds of whitespace errors defined:
* trailing-space: trailing whitespaces at the end of the line.
* space-before-tab: a SP appears immediately before HT in the
indent part of the line.
You can specify the desired types of errors to be detected by
listing their names (unique abbreviations are accepted)
separated by comma. By default, these two errors are always
detected, as that is the traditional behaviour. You can disable
detection of a particular type of error by prefixing a '-' in
front of the name of the error, like this:
[core]
whitespace = -trailing-space
This patch teaches the code to output colored diff with
DIFF_WHITESPACE color to highlight the detected whitespace
errors to honor the new configuration.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h | diff | blob | history | |
config.c | diff | blob | history | |
diff.c | diff | blob | history | |
environment.c | diff | blob | history |