aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-01-15 00:59:05 -0800
committerJunio C Hamano <gitster@pobox.com>2008-02-05 00:38:41 -0800
commitb2979ff599a6bcf9dbf5e2ef1e32b81a1b88e115 (patch)
treeb828718fd340db7f6a704caa04aa05b815a18092 /cache.h
parentc1beba5b479a39143ebef96ba10103bbd9a70089 (diff)
downloadgit-b2979ff599a6bcf9dbf5e2ef1e32b81a1b88e115.tar.gz
git-b2979ff599a6bcf9dbf5e2ef1e32b81a1b88e115.tar.xz
core.whitespace: cr-at-eol
This new error mode allows a line to have a carriage return at the end of the line when checking and fixing trailing whitespace errors. Some people like to keep CRLF line ending recorded in the repository, and still want to take advantage of the automated trailing whitespace stripping. We still show ^M in the diff output piped to "less" to remind them that they do have the CR at the end, but these carriage return characters at the end are no longer flagged as errors. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 549f4bbac..ad11c90ca 100644
--- a/cache.h
+++ b/cache.h
@@ -652,6 +652,7 @@ void shift_tree(const unsigned char *, const unsigned char *, unsigned char *, i
#define WS_TRAILING_SPACE 01
#define WS_SPACE_BEFORE_TAB 02
#define WS_INDENT_WITH_NON_TAB 04
+#define WS_CR_AT_EOL 010
#define WS_DEFAULT_RULE (WS_TRAILING_SPACE|WS_SPACE_BEFORE_TAB)
extern unsigned whitespace_rule_cfg;
extern unsigned whitespace_rule(const char *);