aboutsummaryrefslogtreecommitdiffstats
path: root/diff.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-11-12 14:02:47 -0800
committerJunio C Hamano <gitster@pobox.com>2025-11-12 14:04:04 -0800
commit8d4725e48ef29bd857e21e689411878b6eb4df92 (patch)
treed5df1b43ea085654b7cdd4f8ac07cf8868e00be5 /diff.h
parent419c72cb8ada252b260efc38ff91fe201de7c8c3 (diff)
downloadgit-8d4725e48ef29bd857e21e689411878b6eb4df92.tar.gz
whitespace: correct bit assignment comments
A comment in diff.c claimed that bits up to 12th (counting from 0th) are whitespace rules, and 13th thru 15th are for new/old/context, but it turns out it was miscounting. Correct them, and clarify where the whitespace rule bits come from in the comment. Extend bit assignment comments to cover bits used for color-moved, which weren't described. Also update the way these bit constants are defined to use (1 << N) notation, instead of octal constants, as it tends to make it easier to notice a breakage like this. Sprinkle a few blank lines between logically distinct groups of CPP macro definitions to make them easier to read. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/diff.h b/diff.h
index 2fa256c3ef..cbd355cf50 100644
--- a/diff.h
+++ b/diff.h
@@ -331,9 +331,9 @@ struct diff_options {
int ita_invisible_in_index;
/* white-space error highlighting */
-#define WSEH_NEW (1<<12)
-#define WSEH_CONTEXT (1<<13)
-#define WSEH_OLD (1<<14)
+#define WSEH_NEW (1<<12)
+#define WSEH_CONTEXT (1<<13)
+#define WSEH_OLD (1<<14)
unsigned ws_error_highlight;
const char *prefix;
int prefix_length;