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

Function register_shallow

shallow.c:34–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34int register_shallow(struct repository *r, const struct object_id *oid)
35{
36 struct commit_graft *graft =
37 xmalloc(sizeof(struct commit_graft));
38 struct commit *commit = lookup_commit(r, oid);
39
40 oidcpy(&graft->oid, oid);
41 graft->nr_parent = -1;
42 if (commit && commit->object.parsed) {
43 commit_list_free(commit->parents);
44 commit->parents = NULL;
45 }
46 return register_commit_graft(r, graft, 0);
47}
48
49int unregister_shallow(const struct object_id *oid)
50{

Callers 8

find_commonFunction · 0.85
receive_shallow_infoFunction · 0.85
send_shallowFunction · 0.85
send_unshallowFunction · 0.85
send_shallow_listFunction · 0.85
is_repository_shallowFunction · 0.85
update_shallow_refFunction · 0.85
get_object_listFunction · 0.85

Calls 5

lookup_commitFunction · 0.85
oidcpyFunction · 0.85
commit_list_freeFunction · 0.85
register_commit_graftFunction · 0.85
xmallocFunction · 0.70

Tested by

no test coverage detected