send-pack: fix parsing of --force-with-lease option
authorJunio C Hamano <gitster@pobox.com>
Fri, 2 Aug 2013 23:06:29 +0000 (16:06 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 2 Aug 2013 23:07:45 +0000 (16:07 -0700)
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
index 41dc51221ceff2ccc8133e93e253b7c8d465ed17..4482f16efb66c7fc06c7446a2e992840cc83f798 100644 (file)
@@ -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;
                        }