diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-10-10 14:22:29 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-10-10 14:22:30 -0700 |
| commit | 3eb4cc451ed97123ff76e183a5be8a7dc164d1f6 (patch) | |
| tree | e461fea00a0f4780a41b9baa13de7fd056f644f2 /log-tree.c | |
| parent | 31bc4454de66c22bc8570fd3af52a99843ac69b0 (diff) | |
| parent | 1164e270b5af80516625b628945ec7365d992055 (diff) | |
| download | git-3eb4cc451ed97123ff76e183a5be8a7dc164d1f6.tar.xz | |
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 |
