]> git.ipfire.org Git - thirdparty/git.git/commit - diff.h
diff.c: migrate emit_line_checked to use emit_diff_symbol
authorStefan Beller <sbeller@google.com>
Fri, 30 Jun 2017 00:06:53 +0000 (17:06 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 30 Jun 2017 20:13:01 +0000 (13:13 -0700)
commit091f8e28b452bf800e7abb8dace49ebd8897faac
tree096b420ddd3377d7d165a198b3b62cf74ab8f013
parentb9cbfde6b12f1a8f5341a5be624bd41e12e5dea3
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>
cache.h
diff.c
diff.h