3 test_description
='push from/to a shallow clone over http'
6 .
"$TEST_DIRECTORY"/lib-httpd.sh
15 test_expect_success
'setup' '
16 git config --global transfer.fsckObjects true &&
29 git clone --no-local --depth=2 .git shallow &&
30 git --git-dir=shallow/.git log --format=%s >actual &&
35 test_cmp expect actual &&
36 git clone --no-local --depth=2 full-abc/.git shallow2 &&
37 git --git-dir=shallow2/.git log --format=%s >actual &&
42 test_cmp expect actual
45 test_expect_success
'push to shallow repo via http' '
46 git clone --bare --no-local shallow "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
48 cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
49 git config http.receivepack true
54 git push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master
57 cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
59 git log --format=%s top/master >actual &&
65 test_cmp expect actual
69 test_expect_success
'push from shallow repo via http' '
70 mv "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" shallow-upstream.git &&
71 git clone --bare --no-local full "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
73 cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
74 git config http.receivepack true
77 git push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master &&
79 cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
81 git log --format=%s top/master >actual &&
89 test_cmp expect actual