Skip to content

Commit b18e97c

Browse files
lucianpostongitster
authored andcommitted
log --graph: fix break in graph lines
Output from "git log --graph --stat -p" broke the ancestry graph lines with a single empty line between the diffstat and the patch. Signed-off-by: Lucian Poston <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent aea69a0 commit b18e97c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

diff.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4266,6 +4266,12 @@ void diff_flush(struct diff_options *options)
42664266

42674267
if (output_format & DIFF_FORMAT_PATCH) {
42684268
if (separator) {
4269+
if (options->output_prefix) {
4270+
struct strbuf *msg = NULL;
4271+
msg = options->output_prefix(options,
4272+
options->output_prefix_data);
4273+
fwrite(msg->buf, msg->len, 1, stdout);
4274+
}
42694275
putc(options->line_termination, options->file);
42704276
if (options->stat_sep) {
42714277
/* attach patch instead of inline */

0 commit comments

Comments
 (0)