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

Function create_object

object.c:148–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148void *create_object(struct repository *r, const struct object_id *oid, void *o)
149{
150 struct object *obj = o;
151
152 obj->parsed = 0;
153 obj->flags = 0;
154 oidcpy(&obj->oid, oid);
155
156 if (r->parsed_objects->obj_hash_size - 1 <= r->parsed_objects->nr_objs * 2)
157 grow_object_hash(r);
158
159 insert_obj_hash(obj, r->parsed_objects->obj_hash,
160 r->parsed_objects->obj_hash_size);
161 r->parsed_objects->nr_objs++;
162 return obj;
163}
164
165void *object_as_type(struct object *obj, enum object_type type, int quiet)
166{

Callers 6

lookup_tagFunction · 0.85
lookup_blobFunction · 0.85
verify_one_commit_graphFunction · 0.85
lookup_treeFunction · 0.85
lookup_unknown_objectFunction · 0.85
lookup_commitFunction · 0.85

Calls 3

oidcpyFunction · 0.85
grow_object_hashFunction · 0.85
insert_obj_hashFunction · 0.85

Tested by

no test coverage detected