Re: [PATCH] Check for -amend as a common wrong usage of --amend.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 24, 2008, 18:20 UTC
- Message-ID
- <alpine.LSU.1.00.0801241818441.5731@racer.site>
- In-Reply-To
- <1201198439-3516-1-git-send-email-pascal@obry.net>
Hi,
On Thu, 24 Jan 2008, Pascal Obry wrote:
Show 18 quoted lines
> diff --git a/parse-options.c b/parse-options.c
> index 7a08a0c..248515d 100644
> --- a/parse-options.c
> +++ b/parse-options.c
> @@ -233,6 +233,13 @@ int parse_options(int argc, const char **argv, const struct option *options,
> continue;
> }
>
> + if (!strcmp(arg + 1, "amend")) {
> + error("-amend looks suspicious, don't you meant --amend\n");
> + args.argc--;
> + args.argv++;
> + break;
> + }
> +
> if (arg[1] != '-') {
> args.opt = arg + 1;
> do {That is ugly. In a source file which is by no means specific to git-commit, you cannot possibly mean to check for "amend".
I don't like it, Dscho