Re: [PATCH 08/26] diff.c: migrate emit_line_checked to use emit_diff_symbol

2017-06-22 Thread Junio C Hamano
Stefan Beller writes: > Actually that function already has some quick return: > > static int new_blank_line_at_eof(struct emit_callback *ecbdata, const > char *line, int len) > { > if (!((ecbdata->ws_rule & WS_BLANK_AT_EOF) && > ecbdata->blank_at_eof_in_preimage && > ecbdata

Re: [PATCH 08/26] diff.c: migrate emit_line_checked to use emit_diff_symbol

2017-06-22 Thread Stefan Beller
On Thu, Jun 22, 2017 at 4:30 PM, Stefan Beller wrote: > On Wed, Jun 21, 2017 at 1:05 PM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> static void emit_add_line(const char *reset, >>> struct emit_callback *ecbdata, >>> const char *line, in

Re: [PATCH 08/26] diff.c: migrate emit_line_checked to use emit_diff_symbol

2017-06-22 Thread Stefan Beller
On Wed, Jun 21, 2017 at 1:05 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> static void emit_add_line(const char *reset, >> struct emit_callback *ecbdata, >> const char *line, int len) >> { >> - emit_line_checked(reset, ecbdata, line,

Re: [PATCH 08/26] diff.c: migrate emit_line_checked to use emit_diff_symbol

2017-06-21 Thread Junio C Hamano
Stefan Beller writes: > static void emit_add_line(const char *reset, > struct emit_callback *ecbdata, > const char *line, int len) > { > - emit_line_checked(reset, ecbdata, line, len, > - DIFF_FILE_NEW, WSEH_NEW, '+'); >

[PATCH 08/26] diff.c: migrate emit_line_checked to use emit_diff_symbol

2017-06-19 Thread Stefan Beller
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) * 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