Re: [PATCH] git push: remove incomplete options list from help text
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 19, 2009, 03:13 UTC
- Message-ID
- <7vpr8kcc00.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20091019115412.6117@nanako3.lavabit.com>
Nanako Shiraishi <nanako3@lavabit.com> writes:
Show 22 quoted lines
> 'git push -h' shows usage text with incomplete list of options and then
> has a separate list of options that are supported. Imitate the way other
> commands (I looked at 'git diff' for an example) show their options.
>
> Signed-off-by: しらいし ななこ <nanako3@lavabit.com>
> ---
> ...
> diff --git a/builtin-push.c b/builtin-push.c
> index 3cb1ee4..6686b79 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] [-n | --dry-run] [--porcelain] [--tags] [--receive-pack=<git-receive-pack>] [--repo=<repository>] [-f | --force] [-v] [<repository> <refspec>...]",
> + "git push <options> [<repository> <refspec>...]",
> NULL,
> };
>
> --
> 1.6.5.rc1.18.g53a9aSounds like a sane thing to do, but I am sort of surprised that you are still on 1.6.5-rc1 ;-)
How does this interact with one of the "unapplied patch" you reminded me of, namely, this one:
From: Björn Gustavsson <bgustavsson@gmail.com>
Subject: [PATCH] push: fix usage: --tags is incompatible with --all and --mirror
Date: Thu, 15 Oct 2009 18:39:05 +0200
Message-ID: <4AD75029.1010109@gmail.com> Correct the usage text to make it clear that --tags cannot
be combined with --all or --mirror.The option description that comes from parse-options may need to be updated as well, no?
Show 14 quoted lines
> -q, --quiet be quiet > -v, --verbose be verbose > --repo <repository> repository > --all push all refs > --mirror mirror all refs > --tags push tags > -n, --dry-run dry run > --porcelain machine-readable output > -f, --force force updates > --thin use thin pack > --receive-pack <receive-pack> > receive pack program > --exec <receive-pack> > receive pack program