summaryrefslogtreecommitdiff
path: root/range-diff.c
diff options
context:
space:
mode:
authorThomas Gummerer <t.gummerer@gmail.com>2019-07-11 16:08:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-07-11 21:29:27 (GMT)
commit430be36eb53b042c447201c778b5398df887022f (patch)
tree06f871ccc81faf1069e5735d91c6e7b784d3a1f1 /range-diff.c
parente1db26308413f5da2cef2c9c3869257d1ed6336b (diff)
downloadgit-430be36eb53b042c447201c778b5398df887022f.zip
git-430be36eb53b042c447201c778b5398df887022f.tar.gz
git-430be36eb53b042c447201c778b5398df887022f.tar.bz2
range-diff: suppress line count in outer diff
The line count in the outer diff's hunk headers of a range diff is not all that interesting. It merely shows how far along the inner diff are on both sides. That number is of no use for human readers, and range-diffs are not meant to be machine readable. In a subsequent commit we're going to add some more contextual information such as the filename corresponding to the diff to the hunk headers. Remove the unnecessary information, and just keep the "@@" to indicate that a new hunk of the outer diff is starting. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'range-diff.c')
-rw-r--r--range-diff.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/range-diff.c b/range-diff.c
index a5202d8..f4a90b3 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -486,6 +486,7 @@ int show_range_diff(const char *range1, const char *range2,
opts.output_format = DIFF_FORMAT_PATCH;
opts.flags.suppress_diff_headers = 1;
opts.flags.dual_color_diffed_diffs = dual_color;
+ opts.flags.suppress_hunk_header_line_count = 1;
opts.output_prefix = output_prefix_cb;
strbuf_addstr(&indent, " ");
opts.output_prefix_data = &indent;