MCPcopy Index your code
hub / github.com/git/git / packfile_list_append

Function packfile_list_append

packfile.c:106–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void 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
125struct packed_git *packfile_list_find_oid(struct packfile_list_entry *packs,
126 const struct object_id *oid)

Callers 1

packfile_store_add_packFunction · 0.85

Calls 2

xmallocFunction · 0.70

Tested by

no test coverage detected