summaryrefslogtreecommitdiffstats
path: root/range-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-11-18 10:23:54 +0100
committerJunio C Hamano <gitster@pobox.com>2018-11-18 10:23:54 +0100
commita5170794372cf1325710a3419473c91ec4af53bf (patch)
tree4072402827e66130f30fa1e409bd10e2e3232e47 /range-diff.c
parentMerge branch 'jk/verify-sig-merge-into-void' (diff)
parentrange-diff: make diff option behavior (e.g. --stat) consistent (diff)
downloadgit-a5170794372cf1325710a3419473c91ec4af53bf.tar.xz
git-a5170794372cf1325710a3419473c91ec4af53bf.zip
Merge branch 'ab/range-diff-no-patch'
The "--no-patch" option, which can be used to get a high-level overview without the actual line-by-line patch difference shown, of the "range-diff" command was earlier broken, which has been corrected. * ab/range-diff-no-patch: range-diff: make diff option behavior (e.g. --stat) consistent range-diff: fix regression in passing along diff options range-diff doc: add a section about output stability
Diffstat (limited to 'range-diff.c')
-rw-r--r--range-diff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/range-diff.c b/range-diff.c
index 3958720f00..767af8c5bb 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -461,7 +461,8 @@ int show_range_diff(const char *range1, const char *range2,
struct strbuf indent = STRBUF_INIT;
memcpy(&opts, diffopt, sizeof(opts));
- opts.output_format = DIFF_FORMAT_PATCH;
+ if (!opts.output_format)
+ opts.output_format = DIFF_FORMAT_PATCH;
opts.flags.suppress_diff_headers = 1;
opts.flags.dual_color_diffed_diffs = dual_color;
opts.output_prefix = output_prefix_cb;