diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-09-22 12:36:28 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-09-22 12:36:28 -0700 |
| commit | 634e0084fac75cf85449a813da14968c9663a094 (patch) | |
| tree | 4954184348dd7032043726df7a2e622e97b52d46 /interdiff.c | |
| parent | bcb68bff80eab46f9d5f367555da803e61d3d7c8 (diff) | |
| parent | 07a7f8debfa43bd28537f475925776a92c30a678 (diff) | |
| download | git-634e0084fac75cf85449a813da14968c9663a094.tar.gz | |
Merge branch 'es/format-patch-interdiff-cleanup'
"format-patch --range-diff=<prev> <origin>..HEAD" has been taught
not to ignore <origin> when <prev> is a single version.
* es/format-patch-interdiff-cleanup:
format-patch: use 'origin' as start of current-series-range when known
diff-lib: tighten show_interdiff()'s interface
diff: move show_interdiff() from its own file to diff-lib
Diffstat (limited to 'interdiff.c')
| -rw-r--r-- | interdiff.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/interdiff.c b/interdiff.c deleted file mode 100644 index c81d680a6c..0000000000 --- a/interdiff.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "cache.h" -#include "commit.h" -#include "revision.h" -#include "interdiff.h" - -static struct strbuf *idiff_prefix_cb(struct diff_options *opt, void *data) -{ - return data; -} - -void show_interdiff(struct rev_info *rev, int indent) -{ - struct diff_options opts; - struct strbuf prefix = STRBUF_INIT; - - memcpy(&opts, &rev->diffopt, sizeof(opts)); - opts.output_format = DIFF_FORMAT_PATCH; - opts.output_prefix = idiff_prefix_cb; - strbuf_addchars(&prefix, ' ', indent); - opts.output_prefix_data = &prefix; - diff_setup_done(&opts); - - diff_tree_oid(rev->idiff_oid1, rev->idiff_oid2, "", &opts); - diffcore_std(&opts); - diff_flush(&opts); - - strbuf_release(&prefix); -} |
