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>
Jeff King committed
Feb 14, 2019 at 00:48 UTC
19b9046eedef2c8b39a1192bfcb0541f59acde09
1 file changed
+2
-2
diff.c
+2
-2
@@ -2287,7 +2287,7 @@ const char *diff_line_prefix(struct diff_options *opt)
2287
return msgbuf->buf;
2288
}
2289
2290
-static unsigned long sane_truncate_line(struct emit_callback *ecb, char *line, unsigned long len)
2290
+static unsigned long sane_truncate_line(char *line, unsigned long len)
2291
{
2292
const char *cp;
2293
unsigned long allot;
@@ -2351,7 +2351,7 @@ static void fn_out_consume(void *priv, char *line, unsigned long len)
2351
if (line[0] == '@') {
2352
if (ecbdata->diff_words)
2353
diff_words_flush(ecbdata);
2354
- len = sane_truncate_line(ecbdata, line, len);
2354
+ len = sane_truncate_line(line, len);
2355
find_lno(line, ecbdata);
2356
emit_hunk_header(ecbdata, line, len);
2357
return;