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
This commit is contained in:
@ -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);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user