Skip to content

Commit ab22d2e

Browse files
committed
builtin/push.c: use OPT_BOOL, not OPT_BOOLEAN
The command line parser of "git push" for "--tags", "--delete", and "--thin" options still used outdated OPT_BOOLEAN. Because these options do not give escalating levels when given multiple times, they should use OPT_BOOL. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 47a5918 commit ab22d2e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

builtin/push.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,15 +427,15 @@ int cmd_push(int argc, const char **argv, const char *prefix)
427427
OPT_BIT( 0 , "all", &flags, N_("push all refs"), TRANSPORT_PUSH_ALL),
428428
OPT_BIT( 0 , "mirror", &flags, N_("mirror all refs"),
429429
(TRANSPORT_PUSH_MIRROR|TRANSPORT_PUSH_FORCE)),
430-
OPT_BOOLEAN( 0, "delete", &deleterefs, N_("delete refs")),
431-
OPT_BOOLEAN( 0 , "tags", &tags, N_("push tags (can't be used with --all or --mirror)")),
430+
OPT_BOOL( 0, "delete", &deleterefs, N_("delete refs")),
431+
OPT_BOOL( 0 , "tags", &tags, N_("push tags (can't be used with --all or --mirror)")),
432432
OPT_BIT('n' , "dry-run", &flags, N_("dry run"), TRANSPORT_PUSH_DRY_RUN),
433433
OPT_BIT( 0, "porcelain", &flags, N_("machine-readable output"), TRANSPORT_PUSH_PORCELAIN),
434434
OPT_BIT('f', "force", &flags, N_("force updates"), TRANSPORT_PUSH_FORCE),
435435
{ OPTION_CALLBACK, 0, "recurse-submodules", &flags, N_("check"),
436436
N_("control recursive pushing of submodules"),
437437
PARSE_OPT_OPTARG, option_parse_recurse_submodules },
438-
OPT_BOOLEAN( 0 , "thin", &thin, N_("use thin pack")),
438+
OPT_BOOL( 0 , "thin", &thin, N_("use thin pack")),
439439
OPT_STRING( 0 , "receive-pack", &receivepack, "receive-pack", N_("receive pack program")),
440440
OPT_STRING( 0 , "exec", &receivepack, "receive-pack", N_("receive pack program")),
441441
OPT_BIT('u', "set-upstream", &flags, N_("set upstream for git pull/status"),

0 commit comments

Comments
 (0)