[PATCH 2/6] diff: write prefix to the correct file
- From
John Keeping <john@keeping.me.uk>
- Date
- Feb 7, 2013, 20:15 UTC
- Message-ID
- <c7a6fca9a3199f05281d01f9fddab18a37f28932.1360267849.git.john@keeping.me.uk>
- In-Reply-To
- <cover.1360267849.git.john@keeping.me.uk>
Write the prefix for an output line to the same file as the actual content.
Signed-off-by: John Keeping <john@keeping.me.uk> --- diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/diff.c b/diff.c index 348f71b..bf95235 100644 --- a/diff.c +++ b/diff.c @@ -4485,7 +4485,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) {
-- 1.8.1.2