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

Function load_multi_pack_index_chain

midx.c:365–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363}
364
365static struct multi_pack_index *load_multi_pack_index_chain(struct odb_source *source)
366{
367 struct strbuf chain_file = STRBUF_INIT;
368 struct stat st;
369 int fd;
370 struct multi_pack_index *m = NULL;
371
372 get_midx_chain_filename(source, &chain_file);
373 if (open_multi_pack_index_chain(source->odb->repo->hash_algo, chain_file.buf, &fd, &st)) {
374 int incomplete;
375 /* ownership of fd is taken over by load function */
376 m = load_midx_chain_fd_st(source, fd, &st, &incomplete);
377 }
378
379 strbuf_release(&chain_file);
380 return m;
381}
382
383struct multi_pack_index *load_multi_pack_index(struct odb_source *source)
384{

Callers 1

load_multi_pack_indexFunction · 0.85

Calls 4

get_midx_chain_filenameFunction · 0.85
load_midx_chain_fd_stFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected