summaryrefslogtreecommitdiff
path: root/t/t5710-info-alternate.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-03-25 16:26:27 -0400
committerJunio C Hamano <gitster@pobox.com>2013-03-27 13:47:18 -0700
commit0433ad128c59f233046b3f8a68246ca3a8a77af8 (patch)
treef8d6980d69472867ced6b8d773aa3bcf69a33985 /t/t5710-info-alternate.sh
parent0aac7bb287645dd72ad8ad6b805128b8ff7f111f (diff)
downloadgit-0433ad128c59f233046b3f8a68246ca3a8a77af8.tar.gz
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>
Diffstat (limited to 't/t5710-info-alternate.sh')
-rwxr-xr-xt/t5710-info-alternate.sh8
1 files changed, 1 insertions, 7 deletions
diff --git a/t/t5710-info-alternate.sh b/t/t5710-info-alternate.sh
index 5a6e49d18d..8956c21617 100755
--- a/t/t5710-info-alternate.sh
+++ b/t/t5710-info-alternate.sh
@@ -58,13 +58,7 @@ test_expect_success 'creating too deep nesting' \
git clone -l -s D E &&
git clone -l -s E F &&
git clone -l -s F G &&
-git clone --bare -l -s G H'
-
-test_expect_success 'invalidity of deepest repository' \
-'cd H && {
- test_valid_repo
- test $? -ne 0
-}'
+test_must_fail git clone --bare -l -s G H'
cd "$base_dir"