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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <bebarino@xxxxxxxxx>
> Signed-off-by: Johan Herland <johan@xxxxxxxxxxx>

Acked-by: Stephen Boyd <bebarino@xxxxxxxxx>

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).
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]