Commit 87f1b2d4 authored by Eric Sunshine's avatar Eric Sunshine Committed by Junio C Hamano

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's avatarEric Sunshine <>
Signed-off-by: default avatarJunio C Hamano <>
parent 5cf00cbc
......@@ -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 = {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment