MCPcopy Create free account
hub / github.com/git/git / verify_pack_index

Function verify_pack_index

pack-check.c:183–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183int verify_pack_index(struct packed_git *p)
184{
185 int err = 0;
186
187 if (open_pack_index(p))
188 return error("packfile %s index not opened", p->pack_name);
189
190 /* Verify SHA1 sum of the index file */
191 if (!hashfile_checksum_valid(p->repo->hash_algo, p->index_data, p->index_size))
192 err = error("Packfile index for %s hash mismatch",
193 p->pack_name);
194 return err;
195}
196
197int verify_pack(struct repository *r, struct packed_git *p, verify_fn fn, void *fn_data,
198 struct progress *progress, uint32_t base_count)

Callers 2

verify_packFunction · 0.85

Calls 3

open_pack_indexFunction · 0.85
errorFunction · 0.85
hashfile_checksum_validFunction · 0.85

Tested by

no test coverage detected