author | Nicolas Pitre <nico@cam.org> | |
Fri, 29 Aug 2008 20:08:01 +0000 (16:08 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 30 Aug 2008 04:51:28 +0000 (21:51 -0700) | ||
commit | 8522148f79c29ef8f63688e7186e458a22333224 | |
tree | 6b60d62750d4eb7a573a1744b5999cd31420a645 | tree | snapshot |
parent | ac0463ed44e859c84e354cd0ae47d9b5b124e112 | commit | diff |
index-pack: use fixup_pack_header_footer()'s validation mode
When completing a thin pack, a new header has to be written to
the pack and a new SHA1 computed. Make sure that the SHA1 of what
is being read back matches the SHA1 of what was written for both:
the original pack and the appended objects.
To do so, a couple write_or_die() calls were converted to sha1write()
which has the advantage of doing some buffering as well as handling
SHA1 and CRC32 checksum already.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When completing a thin pack, a new header has to be written to
the pack and a new SHA1 computed. Make sure that the SHA1 of what
is being read back matches the SHA1 of what was written for both:
the original pack and the appended objects.
To do so, a couple write_or_die() calls were converted to sha1write()
which has the advantage of doing some buffering as well as handling
SHA1 and CRC32 checksum already.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
index-pack.c | diff | blob | history |