]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/fsck.c
fsck: use for_each_loose_file_in_objdir
authorJeff King <peff@peff.net>
Thu, 24 Sep 2015 21:08:33 +0000 (17:08 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Oct 2015 18:08:06 +0000 (11:08 -0700)
commitf0766bf94ec7a398a5a524053ea5334883c16a2e
tree7518dc1ef9819673b2b7655ed5c5b1d963657a4e
parente23a91b04702fb3d7a85195ef52bdeacd3ee9433
fsck: use for_each_loose_file_in_objdir

Since 27e1e22 (prune: factor out loose-object directory
traversal, 2014-10-15), we now have a generic callback
system for iterating over the loose object directories. This
is used by prune, count-objects, etc.

We did not convert git-fsck at the time because it
implemented an inode-sorting scheme that was not part of the
generic code. Now that the inode-sorting code is gone, we
can reuse the generic code.  The result is shorter,
hopefully more readable, and drops some unchecked sprintf
calls.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fsck.c