whitespace: allocate a few more bits and define WS_INCOMPLETE_LINE

Reserve a few more bits in the diff flags word to be used for future
whitespace rules.  Add WS_INCOMPLETE_LINE without implementing the
behaviour (yet).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano
2025-11-12 14:02:55 -08:00
parent 3a4eb5ad2e
commit a675104c39
5 changed files with 21 additions and 12 deletions

16
diff.c
View File

@@ -804,15 +804,15 @@ enum diff_symbol {
/*
* Flags for content lines:
* 0..11 are whitespace rules (see ws.h)
* 12..14 are WSEH_NEW | WSEH_CONTEXT | WSEH_OLD
* 16 is marking if the line is blank at EOF
* 17..19 are used for color-moved.
* 0..15 are whitespace rules (see ws.h)
* 16..18 are WSEH_NEW | WSEH_CONTEXT | WSEH_OLD
* 19 is marking if the line is blank at EOF
* 20..22 are used for color-moved.
*/
#define DIFF_SYMBOL_CONTENT_BLANK_LINE_EOF (1<<16)
#define DIFF_SYMBOL_MOVED_LINE (1<<17)
#define DIFF_SYMBOL_MOVED_LINE_ALT (1<<18)
#define DIFF_SYMBOL_MOVED_LINE_UNINTERESTING (1<<19)
#define DIFF_SYMBOL_CONTENT_BLANK_LINE_EOF (1<<19)
#define DIFF_SYMBOL_MOVED_LINE (1<<20)
#define DIFF_SYMBOL_MOVED_LINE_ALT (1<<21)
#define DIFF_SYMBOL_MOVED_LINE_UNINTERESTING (1<<22)
#define DIFF_SYMBOL_CONTENT_WS_MASK (WSEH_NEW | WSEH_OLD | WSEH_CONTEXT | WS_RULE_MASK)