summaryrefslogtreecommitdiff
path: root/log-tree.c
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2020-09-08 03:16:09 -0400
committerJunio C Hamano <gitster@pobox.com>2020-09-08 15:03:27 -0700
commit72a7239016fa4c8919a8b6932ad76e5f820389eb (patch)
tree6fe239c7b77ee41d542fb7b3740cde862cd4eca3 /log-tree.c
parentcdffbdc217aba8a39d786a642d1376a5a605adec (diff)
downloadgit-72a7239016fa4c8919a8b6932ad76e5f820389eb.tar.gz
diff-lib: tighten show_interdiff()'s interface
To compute and show an interdiff, show_interdiff() needs only the two OID's to compare and a diffopts, yet it expects callers to supply an entire rev_info. The demand for rev_info is not only overkill, but also places unnecessary burden on potential future callers which might not otherwise have a rev_info at hand. Address this by tightening its signature to require only the items it needs instead of a full rev_info. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'log-tree.c')
-rw-r--r--log-tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/log-tree.c b/log-tree.c
index 39bb362d5e..ad1e7e31f8 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -799,7 +799,8 @@ void show_log(struct rev_info *opt)
next_commentary_block(opt, NULL);
fprintf_ln(opt->diffopt.file, "%s", opt->idiff_title);
- show_interdiff(opt, 2);
+ show_interdiff(opt->idiff_oid1, opt->idiff_oid2, 2,
+ &opt->diffopt);
memcpy(&diff_queued_diff, &dq, sizeof(diff_queued_diff));
}