diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-08-04 20:52:31 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-08-04 20:52:31 +0300 |
commit | f9712d75e6389866efbe6ad918dc9773a8a880ad (patch) | |
tree | 7ac7b2ac560e3be83b5131207c47adcd11c17a7b /t | |
parent | 23b20fff3ab28b31678d23e67de328ac24801f18 (diff) | |
parent | c512643e67d33673933fa3d245be28b08b974755 (diff) |
Merge branch 'jc/parse-options-short-help'
Command line parser fix, and a small parse-options API update.
* jc/parse-options-short-help:
short help: allow a gap smaller than USAGE_GAP
remote: simplify "remote add --tags" help text
short help: allow multi-line opthelp
Diffstat (limited to 't')
-rw-r--r-- | t/helper/test-parse-options.c | 2 | ||||
-rwxr-xr-x | t/t0040-parse-options.sh | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/t/helper/test-parse-options.c b/t/helper/test-parse-options.c index 00fa281a9c..a4f6e24b0c 100644 --- a/t/helper/test-parse-options.c +++ b/t/helper/test-parse-options.c @@ -133,6 +133,8 @@ int cmd__parse_options(int argc, const char **argv) OPT_STRING(0, "st", &string, "st", "get another string (pervert ordering)"), OPT_STRING('o', NULL, &string, "str", "get another string"), OPT_NOOP_NOARG(0, "obsolete"), + OPT_SET_INT_F(0, "longhelp", &integer, "help text of this entry\n" + "spans multiple lines", 0, PARSE_OPT_NONEG), OPT_STRING_LIST(0, "list", &list, "str", "add str to list"), OPT_GROUP("Magic arguments"), OPT_NUMBER_CALLBACK(&integer, "set integer to NUM", diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh index 7d7ecfd571..e19a199636 100755 --- a/t/t0040-parse-options.sh +++ b/t/t0040-parse-options.sh @@ -30,11 +30,12 @@ usage: test-tool parse-options <options> -F, --file <file> set file to <file> String options - -s, --string <string> - get a string + -s, --string <string> get a string --string2 <str> get another string --st <st> get another string (pervert ordering) -o <str> get another string + --longhelp help text of this entry + spans multiple lines --list <str> add str to list Magic arguments |