summaryrefslogtreecommitdiff
path: root/range-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-11-25 12:29:39 +0900
committerJunio C Hamano <gitster@pobox.com>2024-11-25 12:29:39 +0900
commit6b03fd8dcd1fd88ad834a3b3f678631d6d68ea54 (patch)
treef952c57b48b9fad56e97b3026b9c148a2a3dcb2e /range-diff.c
parent304e77d2f8fc6474281c0b767f5a918d036a0780 (diff)
parent1164e270b5af80516625b628945ec7365d992055 (diff)
Merge branch 'jk/output-prefix-cleanup' into maint-2.47
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);
/*