MCPcopy Index your code
hub / github.com/git/git / run_checkdiff

Function run_checkdiff

diff.c:5112–5134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5110}
5111
5112static void run_checkdiff(struct diff_filepair *p, struct diff_options *o)
5113{
5114 const char *name;
5115 const char *other;
5116 const char *attr_path;
5117
5118 if (DIFF_PAIR_UNMERGED(p)) {
5119 /* unmerged */
5120 return;
5121 }
5122
5123 name = p->one->path;
5124 other = (strcmp(name, p->two->path) ? p->two->path : NULL);
5125 attr_path = other ? other : name;
5126
5127 if (o->prefix_length)
5128 strip_prefix(o->prefix_length, &name, &other);
5129
5130 diff_fill_oid_info(p->one, o->repo->index);
5131 diff_fill_oid_info(p->two, o->repo->index);
5132
5133 builtin_checkdiff(name, other, attr_path, p->one, p->two, o);
5134}
5135
5136void repo_diff_setup(struct repository *r, struct diff_options *options)
5137{

Callers 1

diff_flush_checkdiffFunction · 0.85

Calls 3

strip_prefixFunction · 0.85
diff_fill_oid_infoFunction · 0.85
builtin_checkdiffFunction · 0.85

Tested by

no test coverage detected