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

Signed-off-by: John Keeping <j...@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

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

Reply via email to