summaryrefslogtreecommitdiffstats
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-11-12 14:02:52 -0800
committerJunio C Hamano <gitster@pobox.com>2025-11-12 14:04:04 -0800
commit35925f1832ac00a4926623dff061a3b52123470b (patch)
treeb04b33c9bac079515e2805f0ced37edb7685d930 /diff.c
parent29228cbdc5f8a80b1f61c7cc209ba8e3714cc38e (diff)
downloadgit-35925f1832ac00a4926623dff061a3b52123470b.tar.gz
git-35925f1832ac00a4926623dff061a3b52123470b.zip
diff: call emit_callback ecbdata everywhere
Everybody else, except for emit_rewrite_lines(), calls the emit_callback data ecbdata. Make sure we call the same thing by the same name for consistency. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/diff.c b/diff.c
index 7ee8620429..44b86544b7 100644
--- a/diff.c
+++ b/diff.c
@@ -1780,7 +1780,7 @@ static void add_line_count(struct strbuf *out, int count)
}
}
-static void emit_rewrite_lines(struct emit_callback *ecb,
+static void emit_rewrite_lines(struct emit_callback *ecbdata,
int prefix, const char *data, int size)
{
const char *endp = NULL;
@@ -1791,17 +1791,17 @@ static void emit_rewrite_lines(struct emit_callback *ecb,
endp = memchr(data, '\n', size);
len = endp ? (endp - data + 1) : size;
if (prefix != '+') {
- ecb->lno_in_preimage++;
- emit_del_line(ecb, data, len);
+ ecbdata->lno_in_preimage++;
+ emit_del_line(ecbdata, data, len);
} else {
- ecb->lno_in_postimage++;
- emit_add_line(ecb, data, len);
+ ecbdata->lno_in_postimage++;
+ emit_add_line(ecbdata, data, len);
}
size -= len;
data += len;
}
if (!endp)
- emit_diff_symbol(ecb->opt, DIFF_SYMBOL_NO_LF_EOF, NULL, 0, 0);
+ emit_diff_symbol(ecbdata->opt, DIFF_SYMBOL_NO_LF_EOF, NULL, 0, 0);
}
static void emit_rewrite_diff(const char *name_a,