From: Junio C Hamano Date: Thu, 01 Aug 2013 18:05:02 GMT Subject: [PATCH v3 7/6] t5540/5541: smart-http does not support "--force-with-lease" Message-ID: <7vk3k5s2wh.fsf@alter.siamese.dyndns.org> In-Reply-To: <1374561800-938-1-git-send-email-gitster@pobox.com> The push() method in remote-curl.c is not told and does not pass the necessary information to underlying send-pack, so this extension does not yet work. Leave a note in the test suite. Signed-off-by: Junio C Hamano --- * This is primarily to give a target for other people to shoot at; patches to allow us to flip this expect_failure to expect_success are very much welcomed ;-) t/lib-httpd.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh index 895b925..e2eca1f 100644 --- a/t/lib-httpd.sh +++ b/t/lib-httpd.sh @@ -167,6 +167,22 @@ test_http_push_nonff() { test_expect_success 'non-fast-forward push shows help message' ' test_i18ngrep "Updates were rejected because" output ' + + test_expect_failure 'force with lease aka cas' ' + HEAD=$( cd "$REMOTE_REPO" && git rev-parse --verify HEAD ) && + test_when_finished '\'' + (cd "$REMOTE_REPO" && git update-ref HEAD "$HEAD") + '\'' && + ( + cd "$LOCAL_REPO" && + git push -v --force-with-lease=$BRANCH:$HEAD origin + ) && + git rev-parse --verify "$BRANCH" >expect && + ( + cd "$REMOTE_REPO" && git rev-parse --verify HEAD + ) >actual && + test_cmp expect actual + ' } setup_askpass_helper() { -- 1.8.4-rc0-154-gc668397