diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-05-15 22:59:05 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-05-15 22:59:05 +0200 |
commit | f37da977232ff490343d480dfbcd6afcc4d5523e (patch) | |
tree | d04de190c5e67ec904679755a28b1de1368f782e /builtin/push.c | |
parent | Merge branch 'jc/name-rev-deprecate-stdin-further' (diff) | |
parent | t5583: fix shebang line (diff) | |
download | git-f37da977232ff490343d480dfbcd6afcc4d5523e.tar.xz git-f37da977232ff490343d480dfbcd6afcc4d5523e.zip |
Merge branch 'tl/push-branches-is-an-alias-for-all'
"git push --all" gained an alias "git push --branches".
* tl/push-branches-is-an-alias-for-all:
t5583: fix shebang line
push: introduce '--branches' option
Diffstat (limited to 'builtin/push.c')
-rw-r--r-- | builtin/push.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin/push.c b/builtin/push.c index 4e5780dd50..dbdf609daf 100644 --- a/builtin/push.c +++ b/builtin/push.c @@ -595,11 +595,12 @@ int cmd_push(int argc, const char **argv, const char *prefix) struct option options[] = { OPT__VERBOSITY(&verbosity), OPT_STRING( 0 , "repo", &repo, N_("repository"), N_("repository")), - OPT_BIT( 0 , "all", &flags, N_("push all refs"), TRANSPORT_PUSH_ALL), + OPT_BIT( 0 , "all", &flags, N_("push all branches"), TRANSPORT_PUSH_ALL), + OPT_ALIAS( 0 , "branches", "all"), OPT_BIT( 0 , "mirror", &flags, N_("mirror all refs"), (TRANSPORT_PUSH_MIRROR|TRANSPORT_PUSH_FORCE)), OPT_BOOL('d', "delete", &deleterefs, N_("delete refs")), - OPT_BOOL( 0 , "tags", &tags, N_("push tags (can't be used with --all or --mirror)")), + OPT_BOOL( 0 , "tags", &tags, N_("push tags (can't be used with --all or --branches or --mirror)")), 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), @@ -642,7 +643,7 @@ int cmd_push(int argc, const char **argv, const char *prefix) set_push_cert_flags(&flags, push_cert); if (deleterefs && (tags || (flags & (TRANSPORT_PUSH_ALL | TRANSPORT_PUSH_MIRROR)))) - die(_("options '%s' and '%s' cannot be used together"), "--delete", "--all/--mirror/--tags"); + die(_("options '%s' and '%s' cannot be used together"), "--delete", "--all/--branches/--mirror/--tags"); if (deleterefs && argc < 2) die(_("--delete doesn't make sense without any refs")); |