From: John Keeping Date: Thu, 7 Feb 2013 20:15:24 +0000 (+0000) Subject: diff: write prefix to the correct file X-Git-Tag: v1.8.2-rc0~15^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3bf25c23cd68dd9e99e54bf5443aebbb4a40b7d6;p=thirdparty%2Fgit.git diff: write prefix to the correct file Write the prefix for an output line to the same file as the actual content. Signed-off-by: John Keeping Signed-off-by: Junio C Hamano --- diff --git a/diff.c b/diff.c index 732d4c2275..9513134670 100644 --- a/diff.c +++ b/diff.c @@ -4483,7 +4483,7 @@ void diff_flush(struct diff_options *options) struct strbuf *msg = NULL; msg = options->output_prefix(options, options->output_prefix_data); - fwrite(msg->buf, msg->len, 1, stdout); + fwrite(msg->buf, msg->len, 1, options->file); } putc(options->line_termination, options->file); if (options->stat_sep) {