summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorLucian Poston <lucian.poston@gmail.com>2012-03-20 01:05:34 -0700
committerJunio C Hamano <gitster@pobox.com>2012-03-20 12:30:56 -0700
commitb18e97ceb938362c0be62997ba333d4ad36226e4 (patch)
tree159f9c9edbf2914c8f341c6f20bd855392bf215d /diff.c
parentaea69a016f5bda67c359e43a3cbfabe923ad0f5a (diff)
downloadgit-b18e97ceb938362c0be62997ba333d4ad36226e4.tar.gz
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>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index d922b77aef..7d5b7ecf14 100644
--- a/diff.c
+++ b/diff.c
@@ -4266,6 +4266,12 @@ void diff_flush(struct diff_options *options)
if (output_format & DIFF_FORMAT_PATCH) {
if (separator) {
+ if (options->output_prefix) {
+ struct strbuf *msg = NULL;
+ msg = options->output_prefix(options,
+ options->output_prefix_data);
+ fwrite(msg->buf, msg->len, 1, stdout);
+ }
putc(options->line_termination, options->file);
if (options->stat_sep) {
/* attach patch instead of inline */