| 104 | } |
| 105 | |
| 106 | void packfile_list_append(struct packfile_list *list, struct packed_git *pack) |
| 107 | { |
| 108 | struct packfile_list_entry *entry; |
| 109 | |
| 110 | entry = packfile_list_remove_internal(list, pack); |
| 111 | if (!entry) { |
| 112 | entry = xmalloc(sizeof(*entry)); |
| 113 | entry->pack = pack; |
| 114 | } |
| 115 | entry->next = NULL; |
| 116 | |
| 117 | if (list->tail) { |
| 118 | list->tail->next = entry; |
| 119 | list->tail = entry; |
| 120 | } else { |
| 121 | list->head = list->tail = entry; |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | struct packed_git *packfile_list_find_oid(struct packfile_list_entry *packs, |
| 126 | const struct object_id *oid) |
no test coverage detected