1 Star 1 Fork 0

wl4g-collect/git-2.27.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
interdiff.c 660 Bytes
一键复制 编辑 原始数据 按行查看 历史
wanglsir 提交于 2021-05-24 11:40 . Init Commit
#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);
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/wl4g-collect/git-2.27.0.git
git@gitee.com:wl4g-collect/git-2.27.0.git
wl4g-collect
git-2.27.0
git-2.27.0
master

搜索帮助