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

Function new_parent

builtin/commit-tree.c:27–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25static const char *sign_commit;
26
27static void new_parent(struct commit *parent, struct commit_list **parents_p)
28{
29 struct object_id *oid = &parent->object.oid;
30 struct commit_list *parents;
31 for (parents = *parents_p; parents; parents = parents->next) {
32 if (parents->item == parent) {
33 error(_("duplicate parent %s ignored"), oid_to_hex(oid));
34 return;
35 }
36 parents_p = &parents->next;
37 }
38 commit_list_insert(parent, parents_p);
39}
40
41static int parse_parent_arg_callback(const struct option *opt,
42 const char *arg, int unset)

Callers 1

Calls 3

errorFunction · 0.85
oid_to_hexFunction · 0.85
commit_list_insertFunction · 0.85

Tested by

no test coverage detected