at commit a0189536

1 #ifndef PACKFILE_LIST_H
2 #define PACKFILE_LIST_H
3
4 struct object_id;
5
6 struct packfile_list {
7 struct packfile_list_entry *head, *tail;
8 };
9
10 struct packfile_list_entry {
11 struct packfile_list_entry *next;
12 struct packed_git *pack;
13 };
14
15 void packfile_list_clear(struct packfile_list *list);
16 void packfile_list_remove(struct packfile_list *list, struct packed_git *pack);
17 void packfile_list_prepend(struct packfile_list *list, struct packed_git *pack);
18 void packfile_list_append(struct packfile_list *list, struct packed_git *pack,
19 int skip_dup_check);
20
21 /*
22 * Find the pack within the "packs" list whose index contains the object
23 * "oid". For general object lookups, you probably don't want this; use
24 * find_pack_entry() instead.
25 */
26 struct packed_git *packfile_list_find_oid(struct packfile_list_entry *packs,
27 const struct object_id *oid);
28
29 #endif