summaryrefslogtreecommitdiff
path: root/midx.h
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-08-20 16:51:55 +0000
committerJunio C Hamano <gitster@pobox.com>2018-08-20 15:31:39 -0700
commit2cf489a3bf75d7569c228147c3d9c559f02fd62c (patch)
treef511184918a5b657c166aafc17d109759e536953 /midx.h
parent6d68e6a46174746d95373a47ab4ef4f57aa56d22 (diff)
downloadgit-2cf489a3bf75d7569c228147c3d9c559f02fd62c.tar.gz
multi-pack-index: store local property
A pack-file is 'local' if it is stored within the usual object directory. If it is stored in an alternate, it is non-local. Pack-files are stored using a 'pack_local' member in the packed_git struct. Add a similar 'local' member to the multi_pack_index struct and 'local' parameters to the methods that load and prepare multi- pack-indexes. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'midx.h')
-rw-r--r--midx.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/midx.h b/midx.h
index e3b07f1586..8aa79f4b62 100644
--- a/midx.h
+++ b/midx.h
@@ -18,6 +18,8 @@ struct multi_pack_index {
uint32_t num_packs;
uint32_t num_objects;
+ int local;
+
const unsigned char *chunk_pack_names;
const uint32_t *chunk_oid_fanout;
const unsigned char *chunk_oid_lookup;
@@ -29,14 +31,14 @@ struct multi_pack_index {
char object_dir[FLEX_ARRAY];
};
-struct multi_pack_index *load_multi_pack_index(const char *object_dir);
+struct multi_pack_index *load_multi_pack_index(const char *object_dir, int local);
int bsearch_midx(const struct object_id *oid, struct multi_pack_index *m, uint32_t *result);
struct object_id *nth_midxed_object_oid(struct object_id *oid,
struct multi_pack_index *m,
uint32_t n);
int fill_midx_entry(const struct object_id *oid, struct pack_entry *e, struct multi_pack_index *m);
int midx_contains_pack(struct multi_pack_index *m, const char *idx_name);
-int prepare_multi_pack_index_one(struct repository *r, const char *object_dir);
+int prepare_multi_pack_index_one(struct repository *r, const char *object_dir, int local);
int write_midx_file(const char *object_dir);
void clear_midx_file(const char *object_dir);