diff options
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r-- | builtin-pack-objects.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index 827673ce4e..28207d9b3a 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -209,28 +209,6 @@ static int check_pack_inflate(struct packed_git *p, stream.total_in == len) ? 0 : -1; } -static int check_pack_crc(struct packed_git *p, struct pack_window **w_curs, - off_t offset, off_t len, unsigned int nr) -{ - const uint32_t *index_crc; - uint32_t data_crc = crc32(0, Z_NULL, 0); - - do { - unsigned int avail; - void *data = use_pack(p, w_curs, offset, &avail); - if (avail > len) - avail = len; - data_crc = crc32(data_crc, data, avail); - offset += avail; - len -= avail; - } while (len); - - index_crc = p->index_data; - index_crc += 2 + 256 + p->num_objects * (20/4) + nr; - - return data_crc != ntohl(*index_crc); -} - static void copy_pack_data(struct sha1file *f, struct packed_git *p, struct pack_window **w_curs, |