]> git.99rst.org Git - git.git/commit
pack-revindex: make `load_pack_revindex` take a repository
authorTaylor Blau <redacted>
Wed, 12 Apr 2023 22:20:24 +0000 (18:20 -0400)
committerJunio C Hamano <redacted>
Thu, 13 Apr 2023 14:55:45 +0000 (07:55 -0700)
commit65308ad8f757a823ccf3175609d580da5f767a15
tree09c18147c49a87437f3ac7d7d9bcab78f92df5d3
parentb77919ed6e365f4a7208b41fe85fff8e2e63eff7
pack-revindex: make `load_pack_revindex` take a repository

In a future commit, we will introduce a `pack.readReverseIndex`
configuration, which forces Git to generate the reverse index from
scratch instead of loading it from disk.

In order to avoid reading this configuration value more than once, we'll
use the `repo_settings` struct to lazily load this value.

In order to access the `struct repo_settings`, add a repository argument
to `load_pack_revindex`, and update all callers to pass the correct
instance (in all cases, `the_repository`).

In certain instances, a new function-local variable is introduced to
take the place of a `struct repository *` argument to the function
itself to avoid propagating the new parameter even further throughout
the tree.

Co-authored-by: Derrick Stolee <redacted>
Signed-off-by: Derrick Stolee <redacted>
Signed-off-by: Taylor Blau <redacted>
Acked-by: Derrick Stolee <redacted>
Signed-off-by: Junio C Hamano <redacted>
pack-bitmap.c
pack-revindex.c
pack-revindex.h
packfile.c
git clone https://git.99rst.org/PROJECT