pull: handle git-fetch's options as well
[gitweb.git] / t / t5541-http-push-smart.sh
index ffb3af44984ee4b22dcda50f4f3947d96c95e138..fd7d06b9a23664d0e20cc32a03955ff8816cac7f 100755 (executable)
@@ -6,11 +6,6 @@
 test_description='test smart pushing over http via http-backend'
 . ./test-lib.sh
 
-if test -n "$NO_CURL"; then
-       skip_all='skipping test, git built without http support'
-       test_done
-fi
-
 ROOT_PATH="$PWD"
 . "$TEST_DIRECTORY"/lib-gpg.sh
 . "$TEST_DIRECTORY"/lib-httpd.sh
@@ -158,7 +153,7 @@ test_http_push_nonff "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git \
 test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper' '
        # create a dissimilarly-named remote ref so that git is unable to match the
        # two refs (viz. local, remote) unless an explicit refspec is provided.
-       git push origin master:retsam
+       git push origin master:retsam &&
 
        echo "change changed" > path2 &&
        git commit -a -m path2 --amend &&
@@ -324,6 +319,15 @@ test_expect_success 'push into half-auth-complete requires password' '
        test_cmp expect actual
 '
 
+test_expect_success CMDLINE_LIMIT 'push 2000 tags over http' '
+       sha1=$(git rev-parse HEAD) &&
+       test_seq 2000 |
+         sort |
+         sed "s|.*|$sha1 refs/tags/really-long-tag-name-&|" \
+         >.git/packed-refs &&
+       run_with_limited_cmdline git push --mirror
+'
+
 test_expect_success GPG 'push with post-receive to inspect certificate' '
        (
                cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&