Re: [PATCHv2 2/2] parse-options: simplify usage argh handling

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

 



Stephen Boyd schrieb:
Simplify the argh printing by simply calling usage_argh() if the option
can take an argument. Update macros defined in parse-options.h to set
the PARSE_OPT_NOARG flag.

The only other user of custom non-argument taking options is git-apply
(in this case OPTION_BOOLEAN for deprecated options). Update it to set
the PARSE_OPT_NOARG flag.

Thanks to René Scharfe for the suggestion and starter patch.

Signed-off-by: Stephen Boyd <bebarino@xxxxxxxxx>
---

René, feel free to signoff if you like.

 builtin-apply.c |    6 ++++--
 parse-options.c |   33 ++++-----------------------------
 parse-options.h |   20 +++++++++++++-------
 3 files changed, 21 insertions(+), 38 deletions(-)

Looks good, thanks.  The output of this command:

	$ for c in ./git-*; do $c --help-all </dev/null; done

didn't change, except for git-send-email reporting a different temporary
file name (unrelated to this patch, of course).

Signed-off-by: Rene Scharfe <rene.scharfe@xxxxxxxxxxxxxx>

--
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]