MCPcopy Create free account
hub / github.com/git/git / add_edge_parents

Function add_edge_parents

list-objects.c:255–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255static void add_edge_parents(struct commit *commit,
256 struct rev_info *revs,
257 show_edge_fn show_edge,
258 struct oidset *set)
259{
260 struct commit_list *parents;
261
262 for (parents = commit->parents; parents; parents = parents->next) {
263 struct commit *parent = parents->item;
264 struct tree *tree = repo_get_commit_tree(the_repository,
265 parent);
266
267 if (!tree)
268 continue;
269
270 oidset_insert(set, &tree->object.oid);
271
272 if (!(parent->object.flags & UNINTERESTING))
273 continue;
274 tree->object.flags |= UNINTERESTING;
275
276 if (revs->edge_hint && !(parent->object.flags & SHOWN)) {
277 parent->object.flags |= SHOWN;
278 show_edge(parent);
279 }
280 }
281}
282
283void mark_edges_uninteresting(struct rev_info *revs,
284 show_edge_fn show_edge,

Callers 1

mark_edges_uninterestingFunction · 0.85

Calls 3

repo_get_commit_treeFunction · 0.85
oidset_insertFunction · 0.85
show_edgeFunction · 0.70

Tested by

no test coverage detected