diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-09-06 07:21:17 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-09-06 08:14:31 +0200 |
commit | aeb84b05ae448596c336807631d9633492b3049a (patch) | |
tree | 725a6dd0a1ebb2e513c2c698186c5ea771f791dd /Documentation/config.txt | |
parent | diff --color: color blank-at-eof (diff) | |
download | git-aeb84b05ae448596c336807631d9633492b3049a.tar.xz git-aeb84b05ae448596c336807631d9633492b3049a.zip |
core.whitespace: split trailing-space into blank-at-{eol,eof}
People who configured trailing-space depended on it to catch both extra
white space at the end of line, and extra blank lines at the end of file.
Earlier attempt to introduce only blank-at-eof gave them an escape hatch
to keep the old behaviour, but it is a regression until they explicitly
specify the new error class.
This introduces a blank-at-eol that only catches extra white space at the
end of line, and makes the traditional trailing-space a convenient synonym
to catch both blank-at-eol and blank-at-eof. This way, people who used
trailing-space continue to catch both classes of errors.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/config.txt')
-rw-r--r-- | Documentation/config.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index 871384eb73..2a2f7fcdbb 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -382,7 +382,7 @@ core.whitespace:: consider them as errors. You can prefix `-` to disable any of them (e.g. `-trailing-space`): + -* `trailing-space` treats trailing whitespaces at the end of the line +* `blank-at-eol` treats trailing whitespaces at the end of the line as an error (enabled by default). * `space-before-tab` treats a space character that appears immediately before a tab character in the initial indent part of the line as an @@ -391,6 +391,8 @@ core.whitespace:: space characters as an error (not enabled by default). * `blank-at-eof` treats blank lines added at the end of file as an error (enabled by default). +* `trailing-space` is a short-hand to cover both `blank-at-eol` and + `blank-at-eof`. * `cr-at-eol` treats a carriage-return at the end of line as part of the line terminator, i.e. with it, `trailing-space` does not trigger if the character before such a carriage-return |