pack-objects: use mru list when iterating over packs
[gitweb.git] / cache.h
diff --git a/cache.h b/cache.h
index 51c366c7c823f5fe35d8e89566f3d6aad0c2c447..1064017d13bee27f724a5b70d2e17e37f683c8ee 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -1371,6 +1371,13 @@ extern struct packed_git {
        char pack_name[FLEX_ARRAY]; /* more */
 } *packed_git;
 
+/*
+ * A most-recently-used ordered version of the packed_git list, which can
+ * be iterated instead of packed_git (and marked via mru_mark).
+ */
+struct mru;
+extern struct mru *packed_git_mru;
+
 struct pack_entry {
        off_t offset;
        unsigned char sha1[20];
@@ -1535,7 +1542,15 @@ struct object_info {
                } packed;
        } u;
 };
+
+/*
+ * Initializer for a "struct object_info" that wants no items. You may
+ * also memset() the memory to all-zeroes.
+ */
+#define OBJECT_INFO_INIT {NULL}
+
 extern int sha1_object_info_extended(const unsigned char *, struct object_info *, unsigned flags);
+extern int packed_object_info(struct packed_git *pack, off_t offset, struct object_info *);
 
 /* Dumb servers support */
 extern int update_server_info(int);