Subject: Re: [PATCH] builtin-notes: Minor (mostly parse_options-related) fixes

From: Stephen Boyd <[email-masked]>
Date: Wed, 24 Feb 2010 19:07:26 -0800

On 02/24/2010 04:48 PM, Johan Herland wrote:
> 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 <[email-masked]>
> Signed-off-by: Johan Herland <[email-masked]>

Acked-by: Stephen Boyd <[email-masked]>

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).