diff options
author | Stefan Beller <sbeller@google.com> | 2017-06-29 17:06:51 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-30 13:13:01 -0700 |
commit | 68abc6f1c744cd287423eb451925fe86d1230e12 (patch) | |
tree | 09604185d1b07c576ee1886dc8168ed9ee2a8b10 | |
parent | diff.c: emit_diff_symbol learns DIFF_SYMBOL_CONTEXT_MARKER (diff) | |
download | tgif-68abc6f1c744cd287423eb451925fe86d1230e12.tar.xz |
diff.c: emit_diff_symbol learns DIFF_SYMBOL_CONTEXT_FRAGINFO
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | diff.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -561,6 +561,7 @@ static void emit_line(struct diff_options *o, const char *set, const char *reset } enum diff_symbol { + DIFF_SYMBOL_CONTEXT_FRAGINFO, DIFF_SYMBOL_CONTEXT_MARKER, DIFF_SYMBOL_SEPARATOR }; @@ -570,6 +571,9 @@ static void emit_diff_symbol(struct diff_options *o, enum diff_symbol s, { const char *context, *reset; switch (s) { + case DIFF_SYMBOL_CONTEXT_FRAGINFO: + emit_line(o, "", "", line, len); + break; case DIFF_SYMBOL_CONTEXT_MARKER: context = diff_get_color_opt(o, DIFF_CONTEXT); reset = diff_get_color_opt(o, DIFF_RESET); @@ -705,8 +709,8 @@ static void emit_hunk_header(struct emit_callback *ecbdata, strbuf_add(&msgbuf, line + len, org_len - len); strbuf_complete_line(&msgbuf); - - emit_line(ecbdata->opt, "", "", msgbuf.buf, msgbuf.len); + emit_diff_symbol(ecbdata->opt, + DIFF_SYMBOL_CONTEXT_FRAGINFO, msgbuf.buf, msgbuf.len); strbuf_release(&msgbuf); } |