| 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 | |
| 20 | /* |
| 21 | * Find the pack within the "packs" list whose index contains the object |
| 22 | * "oid". For general object lookups, you probably don't want this; use |
| 23 | * find_pack_entry() instead. |
| 24 | */ |
| 25 | struct packed_git *packfile_list_find_oid(struct packfile_list_entry *packs, |
| 26 | const struct object_id *oid); |
| 27 | |
| 28 | #endif |