On Sun, Jul 22, 2018 at 11:57 AM Eric Sunshine <sunsh...@sunshineco.com> wrote:
> diff --git a/interdiff.c b/interdiff.c > new file mode 100644 > index 0000000000..d0fac10c7c > --- /dev/null > +++ b/interdiff.c > @@ -0,0 +1,17 @@ > +#include "cache.h" > +#include "commit.h" > +#include "revision.h" > +#include "interdiff.h" > + > +void show_interdiff(struct rev_info *rev) > +{ > + struct diff_options opts; > + > + memcpy(&opts, &rev->diffopt, sizeof(opts)); > + opts.output_format = DIFF_FORMAT_PATCH; > + diff_setup_done(&opts); > + > + diff_tree_oid(rev->idiff_oid1, rev->idiff_oid2, "", &opts); > + diffcore_std(&opts); > + diff_flush(&opts); > +} Is it worth adding a new file just for a single function? I haven't read the rest of the series, but the cover letter's diffstat suggests this is it. Is interdiff intended to become a lot more complicated in the future? If not maybe just add this function in diff-lib.c -- Duy