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

Function parse_parent_arg_callback

builtin/commit-tree.c:41–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41static int parse_parent_arg_callback(const struct option *opt,
42 const char *arg, int unset)
43{
44 struct object_id oid;
45 struct commit_list **parents = opt->value;
46
47 BUG_ON_OPT_NEG_NOARG(unset, arg);
48
49 if (repo_get_oid_commit(the_repository, arg, &oid))
50 die(_("not a valid object name %s"), arg);
51
52 odb_assert_oid_type(the_repository->objects, &oid, OBJ_COMMIT);
53 new_parent(lookup_commit(the_repository, &oid), parents);
54 return 0;
55}
56
57static int parse_message_arg_callback(const struct option *opt,
58 const char *arg, int unset)

Callers

nothing calls this directly

Calls 5

repo_get_oid_commitFunction · 0.85
odb_assert_oid_typeFunction · 0.85
new_parentFunction · 0.85
lookup_commitFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected