author | Nicolas Pitre <nico@cam.org> | |
Thu, 29 May 2008 21:34:50 +0000 (17:34 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 2 Jun 2008 06:25:38 +0000 (23:25 -0700) | ||
commit | 6241360498eb811d4bb130328b1d13241c5e14b6 | |
tree | f75cb182548abd11f55d1d444efb8839618cfa51 | tree | snapshot |
parent | d2b3691b61d516a0ad2bf700a2a5d9113ceff0b1 | commit | diff |
make verify-pack a bit more useful with bad packs
When a pack gets corrupted, its SHA1 checksum will fail. However, this
is more useful to let the test go on in order to find the actual
problem location than only complain about the SHA1 mismatch and
bail out.
Also, it is more useful to compare the stored pack SHA1 with the one in
the index file instead of the computed SHA1 since the computed SHA1
from a corrupted pack won't match the one stored in the index either.
Finally a few code and message cleanups were thrown in as a bonus.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When a pack gets corrupted, its SHA1 checksum will fail. However, this
is more useful to let the test go on in order to find the actual
problem location than only complain about the SHA1 mismatch and
bail out.
Also, it is more useful to compare the stored pack SHA1 with the one in
the index file instead of the computed SHA1 since the computed SHA1
from a corrupted pack won't match the one stored in the index either.
Finally a few code and message cleanups were thrown in as a bonus.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pack-check.c | diff | blob | history |