submodule sync: skip work for inactive submodules
[gitweb.git] / t / t5545-push-options.sh
index ea813b9383de96a00b6d6745169ccffc4d45fecc..9a57a7d8f2319e48a267e4f2a605e420f779fd96 100755 (executable)
@@ -3,6 +3,8 @@
 test_description='pushing to a repository using push options'
 
 . ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-httpd.sh
+start_httpd
 
 mk_repo_pair () {
        rm -rf workbench upstream &&
@@ -100,4 +102,17 @@ test_expect_success 'two push options work' '
        test_cmp expect upstream/.git/hooks/post-receive.push_options
 '
 
+test_expect_success 'push option denied properly by http remote helper' '\
+       mk_repo_pair &&
+       git -C upstream config receive.advertisePushOptions false &&
+       git -C upstream config http.receivepack true &&
+       cp -R upstream/.git "$HTTPD_DOCUMENT_ROOT_PATH"/upstream.git &&
+       git clone "$HTTPD_URL"/smart/upstream test_http_clone &&
+       test_commit -C test_http_clone one &&
+       test_must_fail git -C test_http_clone push --push-option=asdf origin master &&
+       git -C test_http_clone push origin master
+'
+
+stop_httpd
+
 test_done