#ifndef PACKFILE_H
#define PACKFILE_H
+#include "oidset.h"
+
/*
* Generate the filename to be used for a pack file with checksum "sha1" and
* extension "ext". The result is written into the strbuf "buf", overwriting
extern void reprepare_packed_git(void);
extern void install_packed_git(struct packed_git *pack);
+struct packed_git *get_packed_git(struct repository *r);
+struct list_head *get_packed_git_mru(struct repository *r);
+
/*
* Give a rough count of objects in the repository. This sacrifices accuracy
* for speed.
extern unsigned char *use_pack(struct packed_git *, struct pack_window **, off_t, unsigned long *);
extern void close_pack_windows(struct packed_git *);
-extern void close_all_packs(void);
+extern void close_all_packs(struct raw_object_store *o);
extern void unuse_pack(struct pack_window **);
extern void clear_delta_base_cache(void);
extern struct packed_git *add_packed_git(const char *path, size_t path_len, int local);
extern int has_pack_index(const unsigned char *sha1);
+/*
+ * Only iterate over packs obtained from the promisor remote.
+ */
+#define FOR_EACH_OBJECT_PROMISOR_ONLY 2
+
/*
* Iterate over packed objects in both the local
* repository and any alternates repositories (unless the
void *data);
extern int for_each_packed_object(each_packed_object_fn, void *, unsigned flags);
+/*
+ * Return 1 if an object in a promisor packfile is or refers to the given
+ * object, 0 otherwise.
+ */
+extern int is_promisor_object(const struct object_id *oid);
+
#endif