summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-02-15 12:54:19 -0800
committerJunio C Hamano <gitster@pobox.com>2017-02-15 12:54:19 -0800
commitca3c2b85d1b081380f3768fa08ca84e7dd7ffa89 (patch)
tree288b680cea43912fe62dc1910ab76a50d43182f0 /t
parent3f4ccb5a579740382fa7685e6d1a00d157b44387 (diff)
parent438fc68462d5839ef6ca231cdcb411105eaf0ba2 (diff)
downloadgit-ca3c2b85d1b081380f3768fa08ca84e7dd7ffa89.tar.gz
Merge branch 'sb/push-options-via-transport'
The push-options given via the "--push-options" option were not passed through to external remote helpers such as "smart HTTP" that are invoked via the transport helper. * sb/push-options-via-transport: push options: pass push options to the transport helper
Diffstat (limited to 't')
-rwxr-xr-xt/t5545-push-options.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t5545-push-options.sh b/t/t5545-push-options.sh
index ea813b9383..9a57a7d8f2 100755
--- a/t/t5545-push-options.sh
+++ b/t/t5545-push-options.sh
@@ -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