]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'dl/push-recurse-submodules-fix'
authorJunio C Hamano <gitster@pobox.com>
Tue, 5 May 2020 21:54:28 +0000 (14:54 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 5 May 2020 21:54:28 +0000 (14:54 -0700)
Code cleanup.

* dl/push-recurse-submodules-fix:
  push: unset PARSE_OPT_OPTARG for --recurse-submodules

1  2 
builtin/push.c

diff --cc builtin/push.c
index dbcb4922aaa385145e4f5c381325cf842bd8f3ab,208c2540e9c3b46265d8059ff2fbc6669ca3389a..bc94078e72f8e57aaed7d6a4d2ec579b2499a1d4
@@@ -550,12 -546,12 +548,11 @@@ int cmd_push(int argc, const char **arg
                OPT_BIT('n' , "dry-run", &flags, N_("dry run"), TRANSPORT_PUSH_DRY_RUN),
                OPT_BIT( 0,  "porcelain", &flags, N_("machine-readable output"), TRANSPORT_PUSH_PORCELAIN),
                OPT_BIT('f', "force", &flags, N_("force updates"), TRANSPORT_PUSH_FORCE),
 -              { OPTION_CALLBACK,
 -                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 },
 +              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")),