git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH v3 7/6] t5540/5541: smart-http does not support "--force-with-lease"
Date: Thu, 01 Aug 2013 11:05:02 -0700	[thread overview]
Message-ID: <7vk3k5s2wh.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1374561800-938-1-git-send-email-gitster@pobox.com> (Junio C. Hamano's message of "Mon, 22 Jul 2013 23:43:14 -0700")

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 <gitster@pobox.com>
---

 * 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

  parent reply	other threads:[~2013-08-01 18:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23  6:43 [PATCH v3 0/6] "git push --cas/--lockref" renamed to "--force-with-lease" Junio C Hamano
2013-07-23  6:43 ` [PATCH v3 1/6] cache.h: move remote/connect API out of it Junio C Hamano
2013-07-23  6:43 ` [PATCH v3 2/6] builtin/push.c: use OPT_BOOL, not OPT_BOOLEAN Junio C Hamano
2013-07-23  6:43 ` [PATCH v3 3/6] remote.c: add command line option parser for "--force-with-lease" Junio C Hamano
2013-07-23  6:43 ` [PATCH v3 4/6] push --force-with-lease: implement logic to populate old_sha1_expect[] Junio C Hamano
2013-07-23  6:43 ` [PATCH v3 5/6] push --force-with-lease: tie it all together Junio C Hamano
2013-07-23  6:43 ` [PATCH v3 6/6] t5533: test "push --force-with-lease" Junio C Hamano
2013-07-23  9:33 ` [PATCH v3 0/6] Jakub Narebski
2013-07-23 18:26   ` Junio C Hamano
2013-07-23 21:26     ` Philip Oakley
2013-07-23 23:18       ` Eric Sunshine
2013-08-01 18:05 ` Junio C Hamano [this message]
2013-08-02 23:13 ` [PATCH v3 8/6] send-pack: fix parsing of --force-with-lease option Junio C Hamano
2013-08-02 23:14 ` [PATCH v3 9/6] push: teach --force-with-lease to smart-http transport Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vk3k5s2wh.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).