parse-options: allow -h as a short option
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | parse-options: deduplicate parse_options_usage() callsparse-options.c | +12 | 0 replies | |
| 2/5 | parse-options: inline parse_options_usage() at its only remaining callerparse-options.c | +1 | 0 replies | |
| 3/5 | parse-options: allow -h as a short optionparse-options.c parse-options.h | +11 | 0 replies | |
| 4/5 | grep: stop using PARSE_OPT_NO_INTERNAL_HELPbuiltin/ | +1 | 0 replies | |
| 5/5 | show-ref: stop using PARSE_OPT_NO_INTERNAL_HELPbuiltin/ | +1 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/5] parse-options: allow -h as a short option
The short option -h is hard-wired in parseopt to list the options of a command together with a short explanation. If -h is to be given a different meaning then the flag PARSE_OPT_NO_INTERNAL_HELP has to be specified, which turns off handling for -h, --help and --help-all (except that --help handling is effectively overridden by git.c, but that's a different story).
Most commands that do that, grep and show-ref in particular, still show the usage when -h is specified as the only parameter and with --help-all by implementing explicit handlers for them. This series makes it easier for them by letting them override -h handling without any flag.
Rene Scharfe (5):
parse-options: deduplicate parse_options_usage() calls
parse-options: inline parse_options_usage() at its only remaining caller
parse-options: allow -h as a short option
grep: stop using PARSE_OPT_NO_INTERNAL_HELP
show-ref: stop using PARSE_OPT_NO_INTERNAL_HELP
builtin/grep.c | 17 +---------------- builtin/show-ref.c | 12 +----------- parse-options.c | 40 ++++++++++++++++++++-------------------- parse-options.h | 2 +- 4 files changed, 23 insertions(+), 48 deletions(-)
Signature · 1 line
2.6.3