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

Function unregister_shallow

shallow.c:49–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49int unregister_shallow(const struct object_id *oid)
50{
51 int pos = commit_graft_pos(the_repository, oid);
52 if (pos < 0)
53 return -1;
54 free(the_repository->parsed_objects->grafts[pos]);
55 if (pos + 1 < the_repository->parsed_objects->grafts_nr)
56 MOVE_ARRAY(the_repository->parsed_objects->grafts + pos,
57 the_repository->parsed_objects->grafts + pos + 1,
58 the_repository->parsed_objects->grafts_nr - pos - 1);
59 the_repository->parsed_objects->grafts_nr--;
60 return 0;
61}
62
63int is_repository_shallow(struct repository *r)
64{

Callers 3

find_commonFunction · 0.85
receive_shallow_infoFunction · 0.85
send_unshallowFunction · 0.85

Calls 1

commit_graft_posFunction · 0.85

Tested by

no test coverage detected