summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2017-06-30 00:06:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-30 20:13:01 (GMT)
commit091f8e28b452bf800e7abb8dace49ebd8897faac (patch)
tree096b420ddd3377d7d165a198b3b62cf74ab8f013 /diff.h
parentb9cbfde6b12f1a8f5341a5be624bd41e12e5dea3 (diff)
downloadgit-091f8e28b452bf800e7abb8dace49ebd8897faac.zip
git-091f8e28b452bf800e7abb8dace49ebd8897faac.tar.gz
git-091f8e28b452bf800e7abb8dace49ebd8897faac.tar.bz2
diff.c: migrate emit_line_checked to use emit_diff_symbol
Add a new flags field to emit_diff_symbol, that will be used by context lines for: * white space rules that are applicable (The first 12 bits) Take a note in cahe.c as well, when this ws rules are extended we have to fix the bits in the flags field. * how the rules are evaluated (actually this double encodes the sign of the line, but the code is easier to keep this way, bits 13,14,15) * if the line a blank line at EOF (bit 16) The check if new lines need to be marked up as extra lines at the end of file, is now done unconditionally. That should be ok, as 'new_blank_line_at_eof' has a quick early return. Signed-off-by: Stefan Beller <sbeller@google.com> 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 2d442e2..ea66168 100644
--- a/diff.h
+++ b/diff.h
@@ -148,9 +148,9 @@ struct diff_options {
int abbrev;
int ita_invisible_in_index;
/* white-space error highlighting */
-#define WSEH_NEW 1
-#define WSEH_CONTEXT 2
-#define WSEH_OLD 4
+#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;