mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
packfile: move get_multi_pack_index() into "midx.c"
The `get_multi_pack_index()` function is declared and implemented in the packfile subsystem, even though it really belongs into the multi-pack index subsystem. The reason for this is likely that it needs to call `packfile_store_prepare()`, which is not exposed by the packfile system. In a subsequent commit we're about to add another caller outside of the packfile system though, so we'll have to expose the function anyway. Do so now already and move `get_multi_pack_index()` into the MIDX subsystem. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
d67530f6bb
commit
ab8aff4a6b
6
midx.c
6
midx.c
@@ -93,6 +93,12 @@ static int midx_read_object_offsets(const unsigned char *chunk_start,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct multi_pack_index *get_multi_pack_index(struct odb_source *source)
|
||||
{
|
||||
packfile_store_prepare(source->odb->packfiles);
|
||||
return source->midx;
|
||||
}
|
||||
|
||||
static struct multi_pack_index *load_multi_pack_index_one(struct odb_source *source,
|
||||
const char *midx_name)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user