X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-push.c;h=8631c06ed6cfdfe12286c5c72ee3f2b733be8986;hb=c51f6ceed6a9a436f16f8b4f17eab1a3d17cffed;hp=787011f928556972b287ca5621a5d462cd6e2543;hpb=cd03eebbfdae712bd4a10d6b393980a8137ce305;p=git.git diff --git a/builtin-push.c b/builtin-push.c index 787011f92..8631c06ed 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -10,7 +10,7 @@ #include "parse-options.h" static const char * const push_usage[] = { - "git push [--all | --mirror] [--dry-run] [--porcelain] [--tags] [--receive-pack=] [--repo=] [-f | --force] [-v] [ ...]", + "git push [] [ ...]", NULL, }; @@ -157,7 +157,7 @@ static int do_push(const char *repo, int flags) continue; error("failed to push some refs to '%s'", url[i]); - if (nonfastforward) { + if (nonfastforward && advice_push_nonfastforward) { printf("To prevent you from losing history, non-fast-forward updates were rejected\n" "Merge the remote changes before pushing again. See the 'non-fast forward'\n" "section of 'git push --help' for details.\n"); @@ -181,8 +181,8 @@ int cmd_push(int argc, const char **argv, const char *prefix) OPT_BIT( 0 , "all", &flags, "push all refs", TRANSPORT_PUSH_ALL), OPT_BIT( 0 , "mirror", &flags, "mirror all refs", (TRANSPORT_PUSH_MIRROR|TRANSPORT_PUSH_FORCE)), - OPT_BOOLEAN( 0 , "tags", &tags, "push tags"), - OPT_BIT( 0 , "dry-run", &flags, "dry run", TRANSPORT_PUSH_DRY_RUN), + OPT_BOOLEAN( 0 , "tags", &tags, "push tags (can't be used with --all or --mirror)"), + OPT_BIT('n' , "dry-run", &flags, "dry run", TRANSPORT_PUSH_DRY_RUN), OPT_BIT( 0, "porcelain", &flags, "machine-readable output", TRANSPORT_PUSH_PORCELAIN), OPT_BIT('f', "force", &flags, "force updates", TRANSPORT_PUSH_FORCE), OPT_BOOLEAN( 0 , "thin", &thin, "use thin pack"),