clone: run check_everything_connected
commit0433ad128c59f233046b3f8a68246ca3a8a77af8
authorJeff King <peff@peff.net>
Mon, 25 Mar 2013 20:26:27 +0000 (25 16:26 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 Mar 2013 20:47:18 +0000 (27 13:47 -0700)
treef8d6980d69472867ced6b8d773aa3bcf69a33985
parent0aac7bb287645dd72ad8ad6b805128b8ff7f111f
clone: run check_everything_connected

When we fetch from a remote, we do a revision walk to make
sure that what we received is connected to our existing
history. We do not do the same check for clone, which should
be able to check that we received an intact history graph.

The upside of this patch is that it will make clone more
resilient against propagating repository corruption. The
downside is that we will now traverse "rev-list --objects
--all" down to the roots, which may take some time (it is
especially noticeable for a "--local --bare" clone).

Note that we need to adjust t5710, which tries to make such
a bogus clone. Rather than checking after the fact that our
clone is bogus, we can simplify it to just make sure "git
clone" reports failure.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/clone.c
t/t1060-object-corruption.sh
t/t5710-info-alternate.sh