Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/midx.h
diff options
context:
space:
mode:
Diffstat (limited to 'midx.h')
-rw-r--r--midx.h27
1 files changed, 20 insertions, 7 deletions
diff --git a/midx.h b/midx.h
index 33c36ae19b..b18cf53bc4 100644
--- a/midx.h
+++ b/midx.h
@@ -1,8 +1,14 @@
-#ifndef __MIDX_H__
-#define __MIDX_H__
+#ifndef MIDX_H
+#define MIDX_H
#include "repository.h"
+struct object_id;
+struct pack_entry;
+struct repository;
+
+#define GIT_TEST_MULTI_PACK_INDEX "GIT_TEST_MULTI_PACK_INDEX"
+
struct multi_pack_index {
struct multi_pack_index *next;
@@ -29,17 +35,24 @@ struct multi_pack_index {
char object_dir[FLEX_ARRAY];
};
+#define MIDX_PROGRESS (1 << 0)
+
struct multi_pack_index *load_multi_pack_index(const char *object_dir, int local);
-int prepare_midx_pack(struct multi_pack_index *m, uint32_t pack_int_id);
+int prepare_midx_pack(struct repository *r, struct multi_pack_index *m, uint32_t pack_int_id);
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 fill_midx_entry(struct repository *r, 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_or_pack_name);
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);
+int write_midx_file(const char *object_dir, unsigned flags);
+void clear_midx_file(struct repository *r);
+int verify_midx_file(struct repository *r, const char *object_dir, unsigned flags);
+int expire_midx_packs(struct repository *r, const char *object_dir, unsigned flags);
+int midx_repack(struct repository *r, const char *object_dir, size_t batch_size, unsigned flags);
+
+void close_midx(struct multi_pack_index *m);
#endif