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

Function odb_source_inmemory_free

odb/source-inmemory.c:342–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342static void odb_source_inmemory_free(struct odb_source *source)
343{
344 struct odb_source_inmemory *inmemory = odb_source_inmemory_downcast(source);
345
346 if (inmemory->objects) {
347 struct object_id null_oid = { 0 };
348
349 oidtree_each(inmemory->objects, &null_oid, 0,
350 inmemory_object_free, NULL);
351 oidtree_clear(inmemory->objects);
352 free(inmemory->objects);
353 }
354
355 free(inmemory->base.path);
356 free(inmemory);
357}
358
359struct odb_source_inmemory *odb_source_inmemory_new(struct object_database *odb)
360{

Callers

nothing calls this directly

Calls 3

oidtree_eachFunction · 0.85
oidtree_clearFunction · 0.85

Tested by

no test coverage detected