Re: [PATCH] builtin-notes: Minor (mostly parse_options-related) fixes
- From
Stephen Boyd <bebarino@gmail.com>
- Date
- Feb 25, 2010, 03:07 UTC
- Message-ID
- <4B85E96E.1080808@gmail.com>
- In-Reply-To
- <201002250148.11487.johan@herland.net>
On 02/24/2010 04:48 PM, Johan Herland wrote:
Show 12 quoted lines
> Use PARSE_OPT_NONEG to disallow --no-<option> for --message, --file, > --reedit-message and --reuse-message. --no-<option> does not make sense > for these options, and specifying PARSE_OPT_NONEG simplifies the code in > the option-handling callbacks. > > Also, use strbuf_addch(... '\n') instead of strbuf_addstr(... "\n") in > couple of places. > > Finally, improve the short-help by dividing the options into two OPT_GROUPs. > > Suggested-by: Stephen Boyd <bebarino@gmail.com> > Signed-off-by: Johan Herland <johan@herland.net>
Acked-by: Stephen Boyd <bebarino@gmail.com>
On a related note, I spent last night splitting up cmd_notes() into subcommands. This way it's more like builtin-remote.c with respect to the many subcommands and allows you to do something like 'git notes add -h' and only see the options for add. I'll send it in a few hours after I have time to polish it up (and probably rebase onto this change).