]> git.ipfire.org Git - thirdparty/git.git/commitdiff
diff: call emit_callback ecbdata everywhere
authorJunio C Hamano <gitster@pobox.com>
Wed, 12 Nov 2025 22:02:52 +0000 (14:02 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Nov 2025 22:04:04 +0000 (14:04 -0800)
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>
diff.c

diff --git a/diff.c b/diff.c
index 7ee8620429116187e660c2ba2b093037dd1f9b3d..44b86544b75f97a612c13dfd8c80603dca4de4b0 100644 (file)
--- 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,