Staging
v0.7.0
v0.7.0
Revision f126a1fb0f2fd3ba392a12c8840bcd1f02a8973c authored by Tran Ngoc Quan on 29 October 2019, 07:38:42 UTC, committed by Tran Ngoc Quan on 29 October 2019, 07:38:42 UTC
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
1 parent e42df36
interdiff.c
#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);
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...