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

Function insert_object

builtin/fast-import.c:505–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503}
504
505static struct object_entry *insert_object(struct object_id *oid)
506{
507 struct object_entry *e;
508 unsigned int hash = oidhash(oid);
509
510 e = hashmap_get_entry_from_hash(&object_table, hash, oid,
511 struct object_entry, ent);
512 if (!e) {
513 e = new_object(oid);
514 e->idx.offset = 0;
515 hashmap_entry_init(&e->ent, hash);
516 hashmap_add(&object_table, &e->ent);
517 }
518
519 return e;
520}
521
522static void invalidate_pack_id(unsigned int id)
523{

Callers 4

store_objectFunction · 0.85
stream_blobFunction · 0.85
insert_object_entryFunction · 0.85
dereferenceFunction · 0.85

Calls 4

oidhashFunction · 0.85
new_objectFunction · 0.85
hashmap_entry_initFunction · 0.85
hashmap_addFunction · 0.85

Tested by

no test coverage detected