author | Junio C Hamano <gitster@pobox.com> | |
Wed, 26 Jan 2011 21:01:54 +0000 (13:01 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 27 Jan 2011 20:58:15 +0000 (12:58 -0800) | ||
commit | ea6f0a23ac63b3a19202db5441704e3d79236ad4 | |
tree | b4c0f33d0a0d8218d111ab4bba7fbc20b302b140 | tree | snapshot |
parent | a1cdc251728b4a2553e38a5427851b14643c7649 | commit | diff |
fsck: do not give up too early in fsck_dir()
When there is a random garbage file whose name happens to be 38-byte
long in a .git/objects/??/ directory, the loop terminated prematurely
without marking all the other files that it hasn't checked in the
readdir() loop.
Treat such a file just like any other garbage file, and do not break out
of the readdir() loop.
While at it, replace repeated sprintf() calls to a single one outside the
loop.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When there is a random garbage file whose name happens to be 38-byte
long in a .git/objects/??/ directory, the loop terminated prematurely
without marking all the other files that it hasn't checked in the
readdir() loop.
Treat such a file just like any other garbage file, and do not break out
of the readdir() loop.
While at it, replace repeated sprintf() calls to a single one outside the
loop.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fsck.c | diff | blob | history |