]> git.ipfire.org Git - thirdparty/git.git/commitdiff
diff: call emit_callback ecbdata everywhere
authorJunio C Hamano <gitster@pobox.com>
Wed, 5 Nov 2025 21:30:46 +0000 (13:30 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Nov 2025 21:37:19 +0000 (13:37 -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 d388d318e4ca2125b3884db7ae53dd202d06e4d1..347cd9c6e90df6dba4b07c79321314adfdf426e8 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,