From 05c1eb10348f159908becc7a6ed6bbcdab24c893 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 2 Aug 2013 15:14:50 -0700 Subject: push: teach --force-with-lease to smart-http transport We have been passing enough information to enable the compare-and-swap logic down to the transport layer, but the transport helper was not passing it to smart-http transport. Signed-off-by: Junio C Hamano --- t/lib-httpd.sh | 3 ++- t/t5541-http-push.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 't') diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh index e2eca1fad0..dab405d574 100644 --- a/t/lib-httpd.sh +++ b/t/lib-httpd.sh @@ -141,10 +141,11 @@ stop_httpd() { -f "$TEST_PATH/apache.conf" $HTTPD_PARA -k stop } -test_http_push_nonff() { +test_http_push_nonff () { REMOTE_REPO=$1 LOCAL_REPO=$2 BRANCH=$3 + EXPECT_CAS_RESULT=${4-failure} test_expect_success 'non-fast-forward push fails' ' cd "$REMOTE_REPO" && diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh index beb00be4b1..470ac54295 100755 --- a/t/t5541-http-push.sh +++ b/t/t5541-http-push.sh @@ -153,7 +153,7 @@ test_expect_success 'used receive-pack service' ' ' test_http_push_nonff "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git \ - "$ROOT_PATH"/test_repo_clone master + "$ROOT_PATH"/test_repo_clone master success 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 -- cgit v1.3-5-g9baa