summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-10-02 18:00:27 -0700
committerJunio C Hamano <gitster@pobox.com>2007-11-02 17:58:09 -0700
commit459fa6d0fe6a45b8b120463b56a68e943e3a8101 (patch)
tree0ff76965a659fb45c0ec917ffffee0418796fd25 /cache.h
parenta9cc857ada7c57069ff00eed8d0addcf55849f39 (diff)
downloadgit-459fa6d0fe6a45b8b120463b56a68e943e3a8101.tar.gz
git-diff: complain about >=8 consecutive spaces in initial indent
This introduces a new whitespace error type, "indent-with-non-tab". The error is about starting a line with 8 or more SP, instead of indenting it with a HT. This is not enabled by default, as some projects employ an indenting policy to use only SPs and no HTs. The kernel folks and git contributors may want to enable this detection with: [core] whitespace = indent-with-non-tab 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 a6e5988f07..3f4282795e 100644
--- a/cache.h
+++ b/cache.h
@@ -608,6 +608,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_DEFAULT_RULE (WS_TRAILING_SPACE|WS_SPACE_BEFORE_TAB)
extern unsigned whitespace_rule;