3 test_description='push from/to a shallow clone over http'
7 if test -n "$NO_CURL"; then
8 say 'skipping test, git built without http support'
12 . "$TEST_DIRECTORY"/lib-httpd.sh
21 test_expect_success 'setup' '
22 git config --global transfer.fsckObjects true &&
35 git clone --no-local --depth=2 .git shallow &&
36 git --git-dir=shallow/.git log --format=%s >actual &&
41 test_cmp expect actual &&
42 git clone --no-local --depth=2 full-abc/.git shallow2 &&
43 git --git-dir=shallow2/.git log --format=%s >actual &&
48 test_cmp expect actual
51 test_expect_success 'push to shallow repo via http' '
52 git clone --bare --no-local shallow "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
54 cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
55 git config http.receivepack true
60 git push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master
63 cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
65 git log --format=%s top/master >actual &&
71 test_cmp expect actual
75 test_expect_success 'push from shallow repo via http' '
76 mv "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" shallow-upstream.git &&
77 git clone --bare --no-local full "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
79 cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
80 git config http.receivepack true
83 git push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master &&
85 cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
87 git log --format=%s top/master >actual &&
95 test_cmp expect actual