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

[PATCH v3 8/6] send-pack: fix parsing of --force-with-lease option

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 2, 2013, 23:13 UTC
Message-ID
<7va9kzptyl.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1374561800-938-1-git-send-email-gitster@pobox.com>

The last argument for parse_push_cas_option() is if it is "unset" (i.e. --no-force-with-lease), and we are parsing the option with an explicit value here, so it has to be 0.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin/send-pack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index 41dc512..4482f16 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -183,7 +183,7 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
 			}
 			if (!prefixcmp(arg, "--" CAS_OPT_NAME "=")) {
 				if (parse_push_cas_option(&cas,
-							  strchr(arg, '=') + 1, 1) < 0)
+							  strchr(arg, '=') + 1, 0) < 0)
 					exit(1);
 				continue;
 			}
-- 
1.8.4-rc1-129-g1f3472b
Previous: Junio C HamanoNext: Junio C Hamano
Message 13 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.