git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 7/6] t5540/5541: smart-http does not support "--force-with-lease"

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 1, 2013, 18:05 UTC
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 <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
Previous: Eric SunshineNext: Junio C Hamano
Message 12 of 14 in “"git push --cas/--lockref" renamed to "--force-with-lease"”
  1. 0/6 "git push --cas/--lockref" renamed to "--force-with-lease"Junio C Hamano, Jul 23, 2013
  2. 1/6 cache.h: move remote/connect API out of itJunio C Hamano, Jul 23, 2013
  3. 2/6 builtin/push.c: use OPT_BOOL, not OPT_BOOLEANJunio C Hamano, Jul 23, 2013
  4. 3/6 remote.c: add command line option parser for "--force-with-lease"Junio C Hamano, Jul 23, 2013
  5. 4/6 push --force-with-lease: implement logic to populate old_sha1_expect[]Junio C Hamano, Jul 23, 2013
  6. 5/6 push --force-with-lease: tie it all togetherJunio C Hamano, Jul 23, 2013
  7. 6/6 t5533: test "push --force-with-lease"Junio C Hamano, Jul 23, 2013
  8. Jakub NarebskiJul 23, 2013
  9. Junio C HamanoJul 23, 2013
  10. Philip OakleyJul 23, 2013
  11. Eric SunshineJul 23, 2013
  12. 7/6 t5540/5541: smart-http does not support "--force-with-lease"Junio C Hamano, Aug 1, 2013
  13. 8/6 send-pack: fix parsing of --force-with-lease optionJunio C Hamano, Aug 2, 2013
  14. 9/6 push: teach --force-with-lease to smart-http transportJunio C Hamano, Aug 2, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.