[PATCH 2/6] diff: write prefix to the correct file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Write the prefix for an output line to the same file as the actual
content.

Signed-off-by: John Keeping <john@xxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]