Re: [PATCH v3] rev-parse --parseopt: option argument name hints
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Mar 20, 2014, 20:18 UTC
- Message-ID
- <CAPig+cTGYufCtVJDxG8RUJgyMbb7c3ZdiYMuoAbhQQaitVWRnQ@mail.gmail.com>
- In-Reply-To
- <1395305092-1928-1-git-send-email-ilya.bobyr@gmail.com>
On Thu, Mar 20, 2014 at 4:44 AM, Ilya Bobyr <ilya.bobyr@gmail.com> wrote:
Show 13 quoted lines
> Built-in commands can specify names for option arguments when usage text > is generated for a command. sh based commands should be able to do the > same. > > Option argument name hint is any text that comes after [*=?!] after the > argument name up to the first whitespace. Underscores are replaced with > whitespace. It is unlikely that an underscore would be useful in the > hint text. > > Signed-off-by: Ilya Bobyr <ilya.bobyr@gmail.com> > --- > Changed according to the last comments. Added "Usage text" paragraph in the > documentation and updated variable names.
As this is a high-traffic list, it can be difficult for reviewers to remember all the comments regarding the previous version. It can help a lot if you include a reference to the previous attempt, like this [1].
[1]: http://thread.gmane.org/gmane.comp.version-control.git/243216/focus=243945
One more comment below...
Show 10 quoted lines
> diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt > index 0d2cdcd..b8aabc9 100644 > --- a/Documentation/git-rev-parse.txt > +++ b/Documentation/git-rev-parse.txt > @@ -313,6 +313,12 @@ Each line of options has this format: > > * Use `!` to not make the corresponding negated long option available. > > +`<arg_hint>`:: > + `<arg_hing>`, if specified, is used as a name of the argument in the
arg_hing?
Show 6 quoted lines
> + help output, for options that take arguments. `<arg_hint>` is > + terminated by the first whitespace. When output the name is shown in > + angle braces. Underscore symbols are replaced with spaces. > + > The remainder of the line, after stripping the spaces, is used > as the help associated to the option.