diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-05-06 00:54:28 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-06 00:54:28 +0300 |
commit | b75dc16ae3aa325941d64a3d0cfc1690a164786a (patch) | |
tree | f433b463f4b07f7b473decd8dfde134ab346b4bc /builtin/push.c | |
parent | 66527162008d2792c0000096dd7a41d6d5797df3 (diff) | |
parent | ce9baf234f04d2f1d183edbdc14e4ee9da46d895 (diff) |
Merge branch 'dl/push-recurse-submodules-fix'
Code cleanup.
* dl/push-recurse-submodules-fix:
push: unset PARSE_OPT_OPTARG for --recurse-submodules
Diffstat (limited to 'builtin/push.c')
-rw-r--r-- | builtin/push.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/builtin/push.c b/builtin/push.c index dbcb4922aa..bc94078e72 100644 --- a/builtin/push.c +++ b/builtin/push.c @@ -436,10 +436,8 @@ static int option_parse_recurse_submodules(const struct option *opt, if (unset) *recurse_submodules = RECURSE_SUBMODULES_OFF; - else if (arg) - *recurse_submodules = parse_push_recurse_submodules_arg(opt->long_name, arg); else - die("%s missing parameter", opt->long_name); + *recurse_submodules = parse_push_recurse_submodules_arg(opt->long_name, arg); return 0; } @@ -553,9 +551,8 @@ int cmd_push(int argc, const char **argv, const char *prefix) OPT_CALLBACK_F(0, CAS_OPT_NAME, &cas, N_("<refname>:<expect>"), N_("require old value of ref to be at this value"), PARSE_OPT_OPTARG | PARSE_OPT_LITERAL_ARGHELP, parseopt_push_cas_option), - { OPTION_CALLBACK, 0, "recurse-submodules", &recurse_submodules, "(check|on-demand|no)", - N_("control recursive pushing of submodules"), - PARSE_OPT_OPTARG, option_parse_recurse_submodules }, + OPT_CALLBACK(0, "recurse-submodules", &recurse_submodules, "(check|on-demand|no)", + N_("control recursive pushing of submodules"), option_parse_recurse_submodules), OPT_BOOL_F( 0 , "thin", &thin, N_("use thin pack"), PARSE_OPT_NOCOMPLETE), OPT_STRING( 0 , "receive-pack", &receivepack, "receive-pack", N_("receive pack program")), OPT_STRING( 0 , "exec", &receivepack, "receive-pack", N_("receive pack program")), |