diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-10-10 23:22:29 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-10-10 23:22:30 +0200 |
commit | 3eb4cc451ed97123ff76e183a5be8a7dc164d1f6 (patch) | |
tree | e461fea00a0f4780a41b9baa13de7fd056f644f2 /log-tree.c | |
parent | Merge branch 'ps/leakfixes-part-8' (diff) | |
parent | diff: store graph prefix buf in git_graph struct (diff) | |
download | git-3eb4cc451ed97123ff76e183a5be8a7dc164d1f6.tar.xz git-3eb4cc451ed97123ff76e183a5be8a7dc164d1f6.zip |
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 'log-tree.c')
-rw-r--r-- | log-tree.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/log-tree.c b/log-tree.c index 60774c16b3..ba5632805e 100644 --- a/log-tree.c +++ b/log-tree.c @@ -922,12 +922,7 @@ int log_tree_diff_flush(struct rev_info *opt) * diff/diffstat output for readability. */ int pch = DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_PATCH; - if (opt->diffopt.output_prefix) { - struct strbuf *msg = NULL; - msg = opt->diffopt.output_prefix(&opt->diffopt, - opt->diffopt.output_prefix_data); - fwrite(msg->buf, msg->len, 1, opt->diffopt.file); - } + fputs(diff_line_prefix(&opt->diffopt), opt->diffopt.file); /* * We may have shown three-dashes line early |