| 363 | } |
| 364 | |
| 365 | static 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 | |
| 383 | struct multi_pack_index *load_multi_pack_index(struct odb_source *source) |
| 384 | { |
no test coverage detected