diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-12-09 01:23:48 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-09 01:23:48 -0800 |
commit | 4eb39e9bcccc54eb23af8a7e2676c63e5bf32866 (patch) | |
tree | c6a62b68b86275d7db7bda65fa448c92feeba130 /cache.h | |
parent | 05e74f4111b5ce5995dd1145f83398fe40a318e0 (diff) | |
parent | cf1b7869f0c571bbd4f72a4355d9aca558baa0da (diff) | |
download | git-4eb39e9bcccc54eb23af8a7e2676c63e5bf32866.tar.gz git-4eb39e9bcccc54eb23af8a7e2676c63e5bf32866.tar.xz |
Merge branch 'jc/spht'
* jc/spht:
Use gitattributes to define per-path whitespace rule
core.whitespace: documentation updates.
builtin-apply: teach whitespace_rules
builtin-apply: rename "whitespace" variables and fix styles
core.whitespace: add test for diff whitespace error highlighting
git-diff: complain about >=8 consecutive spaces in initial indent
War on whitespace: first, a bit of retreat.
Conflicts:
cache.h
config.c
diff.c
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -644,6 +644,18 @@ 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 *); + /* ls-files */ int pathspec_match(const char **spec, char *matched, const char *filename, int skiplen); int report_path_error(const char *ps_matched, const char **pathspec, int prefix_offset); |