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 <lucian.poston@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Lucian Poston committed
Mar 20, 2012 at 01:05 UTC
b18e97ceb938362c0be62997ba333d4ad36226e4
1 file changed
+6
diff.c
+6
@@ -4266,6 +4266,12 @@ void diff_flush(struct diff_options *options)
4266
4267
if (output_format & DIFF_FORMAT_PATCH) {
4268
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
+ }
4275
putc(options->line_termination, options->file);
4276
if (options->stat_sep) {
4277
/* attach patch instead of inline */