diff options
Diffstat (limited to 'pack-check.c')
-rw-r--r-- | pack-check.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/pack-check.c b/pack-check.c index 0c19b6e5a5..7ac9b3a681 100644 --- a/pack-check.c +++ b/pack-check.c @@ -113,18 +113,13 @@ static int verify_packfile(struct packed_git *p, p->pack_name, (uintmax_t)offset); } data = unpack_entry(p, entries[i].offset, &type, &size); - if (!data) { + if (!data) err = error("cannot unpack %s from %s at offset %"PRIuMAX"", sha1_to_hex(entries[i].sha1), p->pack_name, (uintmax_t)entries[i].offset); - break; - } - if (check_sha1_signature(entries[i].sha1, data, size, typename(type))) { + else if (check_sha1_signature(entries[i].sha1, data, size, typename(type))) err = error("packed %s from %s is corrupt", sha1_to_hex(entries[i].sha1), p->pack_name); - free(data); - break; - } free(data); } free(entries); |