Code

Use gitattributes to define per-path whitespace rule
[git.git] / cache.h
diff --git a/cache.h b/cache.h
index bfffa05dff149a948e46b04f6b15589e6f4be07e..9cc6268d4531f17703268f49057e4c9f284f0331 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -602,4 +602,16 @@ extern int diff_auto_refresh_index;
 /* match-trees.c */
 void shift_tree(const unsigned char *, const unsigned char *, unsigned char *, int);
 
+/*
+ * whitespace rules.
+ * used by both diff and apply
+ */
+#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_cfg;
+extern unsigned whitespace_rule(const char *);
+extern unsigned parse_whitespace_rule(const char *);
+
 #endif /* CACHE_H */