1 Star 0 Fork 0

王哲King/git

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

搜索帮助