summaryrefslogtreecommitdiff
path: root/range-diff.c
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2018-07-22 09:57:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-14 21:24:56 (GMT)
commit87f1b2d45ca7987cc6cc1a74eb66a77fa11fab94 (patch)
treee38ddf762e28fc555c4e4a41169428b7979507cb /range-diff.c
parent5cf00cbc0f0134d658c0507160854e677af6d199 (diff)
downloadgit-87f1b2d45ca7987cc6cc1a74eb66a77fa11fab94.zip
git-87f1b2d45ca7987cc6cc1a74eb66a77fa11fab94.tar.gz
git-87f1b2d45ca7987cc6cc1a74eb66a77fa11fab94.tar.bz2
range-diff: respect diff_option.file rather than assuming 'stdout'
The actual diffs output by range-diff respect diff_option.file, which range-diff passes down the call-chain, thus are destination-agnostic. However, output_pair_header() is hard-coded to emit to 'stdout'. Fix this by making output_pair_header() respect diff_option.file, as well. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'range-diff.c')
-rw-r--r--range-diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/range-diff.c b/range-diff.c
index b6b9aba..defe31f 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -323,7 +323,7 @@ static void output_pair_header(struct diff_options *diffopt,
}
strbuf_addf(buf, "%s\n", color_reset);
- fwrite(buf->buf, buf->len, 1, stdout);
+ fwrite(buf->buf, buf->len, 1, diffopt->file);
}
static struct userdiff_driver no_func_name = {