summaryrefslogtreecommitdiff
path: root/range-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-10-10 14:22:29 -0700
committerJunio C Hamano <gitster@pobox.com>2024-10-10 14:22:30 -0700
commit3eb4cc451ed97123ff76e183a5be8a7dc164d1f6 (patch)
treee461fea00a0f4780a41b9baa13de7fd056f644f2 /range-diff.c
parent31bc4454de66c22bc8570fd3af52a99843ac69b0 (diff)
parent1164e270b5af80516625b628945ec7365d992055 (diff)
Merge branch 'jk/output-prefix-cleanup'
Code clean-up. * jk/output-prefix-cleanup: diff: store graph prefix buf in git_graph struct diff: return line_prefix directly when possible diff: return const char from output_prefix callback diff: drop line_prefix_length field line-log: use diff_line_prefix() instead of custom helper
Diffstat (limited to 'range-diff.c')
-rw-r--r--range-diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/range-diff.c b/range-diff.c
index bbb0952264..10885ba301 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -480,7 +480,7 @@ static void patch_diff(const char *a, const char *b,
diff_flush(diffopt);
}
-static struct strbuf *output_prefix_cb(struct diff_options *opt UNUSED, void *data)
+static const char *output_prefix_cb(struct diff_options *opt UNUSED, void *data)
{
return data;
}
@@ -508,7 +508,7 @@ static void output(struct string_list *a, struct string_list *b,
opts.flags.suppress_hunk_header_line_count = 1;
opts.output_prefix = output_prefix_cb;
strbuf_addstr(&indent, " ");
- opts.output_prefix_data = &indent;
+ opts.output_prefix_data = indent.buf;
diff_setup_done(&opts);
/*