3 test_description
='test quickfetch from local'
7 test_expect_success setup
'
12 git commit -m initial &&
15 git count-objects | sed -e "s/ *objects,.*//"
20 test_expect_success
'clone without alternate' '
26 git remote add -f origin ..
30 git count-objects | sed -e "s/ *objects,.*//"
35 test_expect_success
'further commits in the original' '
39 git commit -a -m second &&
42 git count-objects | sed -e "s/ *objects,.*//"
47 test_expect_success
'copy commit and tree but not blob by hand' '
49 git rev-list --objects HEAD |
50 git pack-objects --stdout |
58 git count-objects | sed -e "s/ *objects,.*//"
62 blob=$(git rev-parse HEAD:file | sed -e "s|..|&/|") &&
63 test -f "cloned/.git/objects/$blob" &&
64 rm -f "cloned/.git/objects/$blob" &&
68 git count-objects | sed -e "s/ *objects,.*//"
74 test_expect_success
'quickfetch should not leave a corrupted repository' '
83 git count-objects | sed -e "s/ *objects,.*//"