summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2020-09-08 07:16:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-08 22:03:27 (GMT)
commit72a7239016fa4c8919a8b6932ad76e5f820389eb (patch)
tree6fe239c7b77ee41d542fb7b3740cde862cd4eca3 /diff.h
parentcdffbdc217aba8a39d786a642d1376a5a605adec (diff)
downloadgit-72a7239016fa4c8919a8b6932ad76e5f820389eb.zip
git-72a7239016fa4c8919a8b6932ad76e5f820389eb.tar.gz
git-72a7239016fa4c8919a8b6932ad76e5f820389eb.tar.bz2
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 'diff.h')
-rw-r--r--diff.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/diff.h b/diff.h
index 308937c..49242d2 100644
--- a/diff.h
+++ b/diff.h
@@ -600,7 +600,12 @@ int index_differs_from(struct repository *r, const char *def,
const struct diff_flags *flags,
int ita_invisible_in_index);
-void show_interdiff(struct rev_info *, int indent);
+/*
+ * Emit an interdiff of two object ID's to 'diff_options.file' optionally
+ * indented by 'indent' spaces.
+ */
+void show_interdiff(const struct object_id *, const struct object_id *,
+ int indent, struct diff_options *);
/*
* Fill the contents of the filespec "df", respecting any textconv defined by