Skip to content

Commit

Permalink
diff: write prefix to the correct file
Browse files Browse the repository at this point in the history
Write the prefix for an output line to the same file as the actual
content.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
John Keeping authored and Junio C Hamano committed Feb 12, 2013
1 parent a48ec24 commit 3bf25c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3bf25c2

Please sign in to comment.