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

Function close_midx

midx.c:399–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397}
398
399void close_midx(struct multi_pack_index *m)
400{
401 uint32_t i;
402
403 if (!m)
404 return;
405
406 close_midx(m->base_midx);
407
408 munmap((unsigned char *)m->data, m->data_len);
409
410 for (i = 0; i < m->num_packs; i++) {
411 if (m->packs[i] && m->packs[i] != MIDX_PACK_ERROR)
412 m->packs[i]->multi_pack_index = 0;
413 }
414 FREE_AND_NULL(m->packs);
415 FREE_AND_NULL(m->pack_names);
416 FREE_AND_NULL(m->pack_names_sorted);
417 free(m);
418}
419
420static uint32_t midx_for_object(struct multi_pack_index **_m, uint32_t pos)
421{

Callers 10

packfile_store_closeFunction · 0.85
load_midx_chain_fd_stFunction · 0.85
clear_midx_fileFunction · 0.85
verify_midx_fileFunction · 0.85
write_midx_internalFunction · 0.85
read_midx_fileFunction · 0.85
read_midx_checksumFunction · 0.85
read_midx_preferred_packFunction · 0.85

Calls

no outgoing calls

Tested by 4

read_midx_fileFunction · 0.68
read_midx_checksumFunction · 0.68
read_midx_preferred_packFunction · 0.68