Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2018-07-22 12:57:10 +0300
committerJunio C Hamano <gitster@pobox.com>2018-08-15 00:24:56 +0300
commit87f1b2d45ca7987cc6cc1a74eb66a77fa11fab94 (patch)
treee38ddf762e28fc555c4e4a41169428b7979507cb /range-diff.c
parent5cf00cbc0f0134d658c0507160854e677af6d199 (diff)
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 b6b9abac26..defe31f095 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 = {