diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-08-11 15:46:49 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-08-11 09:22:23 -0700 |
| commit | 7744936f374308d6fa3c6e317fb8fe0b685d0ef2 (patch) | |
| tree | 84e6c4d2ae9ddaba2aa5b2ef49bd1349b297f9bd /midx.h | |
| parent | c3f5d251469525a52074b0373671a588f0e5b972 (diff) | |
| download | git-7744936f374308d6fa3c6e317fb8fe0b685d0ef2.tar.xz | |
midx: stop duplicating info redundant with its owning source
Multi-pack indices store some information that is redundant with their
owning source:
- The locality bit that tracks whether the source is the primary
object source or an alternate.
- The object directory path the multi-pack index is located in.
- The pointer to the owning parent directory.
All of this information is already contained in `struct odb_source`. So
now that we always have that struct available when loading a multi-pack
index we have it readily accessible.
Drop the redundant information and instead store a pointer to the object
source.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'midx.h')
| -rw-r--r-- | midx.h | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -35,6 +35,8 @@ struct odb_source; "GIT_TEST_MULTI_PACK_INDEX_WRITE_INCREMENTAL" struct multi_pack_index { + struct odb_source *source; + const unsigned char *data; size_t data_len; @@ -50,7 +52,6 @@ struct multi_pack_index { uint32_t num_objects; int preferred_pack_idx; - int local; int has_chain; const unsigned char *chunk_pack_names; @@ -71,10 +72,6 @@ struct multi_pack_index { const char **pack_names; struct packed_git **packs; - - struct repository *repo; - - char object_dir[FLEX_ARRAY]; }; #define MIDX_PROGRESS (1 << 0) |
