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>
This commit is contained in:

committed by
Junio C Hamano

parent
0aac7bb287
commit
0433ad128c
@ -79,7 +79,7 @@ test_expect_success 'clone --no-local --bare detects missing object' '
|
||||
test_must_fail git clone --no-local --bare missing missing-transport
|
||||
'
|
||||
|
||||
test_expect_failure 'clone --no-local --bare detects misnamed object' '
|
||||
test_expect_success 'clone --no-local --bare detects misnamed object' '
|
||||
test_must_fail git clone --no-local --bare misnamed misnamed-transport
|
||||
'
|
||||
|
||||
|
Reference in New Issue
Block a user