diff options
author | Jeff King <peff@peff.net> | 2019-02-14 08:48:27 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-02-15 02:26:14 +0300 |
commit | 19b9046eedef2c8b39a1192bfcb0541f59acde09 (patch) | |
tree | d3da9c5740956bd5d8702622c3da62ecf36a5dec /diff.c | |
parent | e04df61256a40e860dfcc5518fd4f0558c8c2f03 (diff) |
diff: drop unused emit data parameter from sane_truncate_line()
We pass the "struct emit_callback" (which contains all of the context
for our diff) into sane_truncate_line(), but that function doesn't
actually use it. In theory we might eventually develop a diff option
that impacts this, but in the meantime let's not mislead anybody reading
the code. Since the function is static, it would be easy to pass it
again if it should ever become useful.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2287,7 +2287,7 @@ const char *diff_line_prefix(struct diff_options *opt) return msgbuf->buf; } -static unsigned long sane_truncate_line(struct emit_callback *ecb, char *line, unsigned long len) +static unsigned long sane_truncate_line(char *line, unsigned long len) { const char *cp; unsigned long allot; @@ -2351,7 +2351,7 @@ static void fn_out_consume(void *priv, char *line, unsigned long len) if (line[0] == '@') { if (ecbdata->diff_words) diff_words_flush(ecbdata); - len = sane_truncate_line(ecbdata, line, len); + len = sane_truncate_line(line, len); find_lno(line, ecbdata); emit_hunk_header(ecbdata, line, len); return; |