3 test_description
='test quickfetch from local'
7 say
"git remote does not work in the test suite. Skipping tests."
10 test_expect_success setup
'
15 git commit -m initial &&
18 git count-objects | sed -e "s/ *objects,.*//"
23 test_expect_success
'clone without alternate' '
29 git remote add -f origin ..
33 git count-objects | sed -e "s/ *objects,.*//"
38 test_expect_success
'further commits in the original' '
42 git commit -a -m second &&
45 git count-objects | sed -e "s/ *objects,.*//"
50 test_expect_success
'copy commit and tree but not blob by hand' '
52 git rev-list --objects HEAD |
53 git pack-objects --stdout |
61 git count-objects | sed -e "s/ *objects,.*//"
65 blob=$(git rev-parse HEAD:file | sed -e "s|..|&/|") &&
66 test -f "cloned/.git/objects/$blob" &&
67 rm -f "cloned/.git/objects/$blob" &&
71 git count-objects | sed -e "s/ *objects,.*//"
77 test_expect_success
'quickfetch should not leave a corrupted repository' '
86 git count-objects | sed -e "s/ *objects,.*//"