From: Johannes Schindelin Date: Thu, 24 Jan 2008 18:20:00 GMT Subject: Re: [PATCH] Check for -amend as a common wrong usage of --amend. Message-ID: In-Reply-To: <1201198439-3516-1-git-send-email-pascal@obry.net> Hi, On Thu, 24 Jan 2008, Pascal Obry wrote: > 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