Skip to content

Commit 19b9046

Browse files
peffgitster
authored andcommitted
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>
1 parent e04df61 commit 19b9046

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

diff.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2287,7 +2287,7 @@ const char *diff_line_prefix(struct diff_options *opt)
22872287
return msgbuf->buf;
22882288
}
22892289

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)
22912291
{
22922292
const char *cp;
22932293
unsigned long allot;
@@ -2351,7 +2351,7 @@ static void fn_out_consume(void *priv, char *line, unsigned long len)
23512351
if (line[0] == '@') {
23522352
if (ecbdata->diff_words)
23532353
diff_words_flush(ecbdata);
2354-
len = sane_truncate_line(ecbdata, line, len);
2354+
len = sane_truncate_line(line, len);
23552355
find_lno(line, ecbdata);
23562356
emit_hunk_header(ecbdata, line, len);
23572357
return;

0 commit comments

Comments
 (0)