aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-rev-parse.txt
diff options
context:
space:
mode:
authorIlya Bobyr <ilya.bobyr@gmail.com>2015-07-14 01:17:44 -0700
committerJunio C Hamano <gitster@pobox.com>2015-07-15 10:30:54 -0700
commit2d893dff4c3c49750557da7a1701b46c1fe95844 (patch)
treec31c50bce40469019197d39e3c7d8f0a08ab04a2 /Documentation/git-rev-parse.txt
parent7ecec52d42a964c4a8e9f6ca41bb0b5ce00049b4 (diff)
downloadgit-2d893dff4c3c49750557da7a1701b46c1fe95844.tar.gz
rev-parse --parseopt: allow [*=?!] in argument hints
A line in the input to "rev-parse --parseopt" describes an option by listing a short and/or long name, optional flags [*=?!], argument hint, and then whitespace and help string. We did not allow any of the [*=?!] characters in the argument hints. The following input pair=key=value equals sign in the hint used to generate a help line like this: --pair=key <value> equals sign in the hint and used to expect "pair=key" as the argument name. That is not very helpful as we generally do not want any of the [*=?!] characters in the argument names. But we do want to use at least the equals sign in the argument hints. Update the parser to make long argument names stop at the first [*=?!] character. Add test case with equals sign in the argument hint and update the test to perform all the operations in test_expect_success matching the t/README requirements and allowing commands like ./t1502-rev-parse-parseopt.sh --run=1-2 to stop at the test case 2 without any further modification of the test state area. Signed-off-by: Ilya Bobyr <ilya.bobyr@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-rev-parse.txt')
-rw-r--r--Documentation/git-rev-parse.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index c483100e75..b6c6326cdc 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -311,8 +311,8 @@ Each line of options has this format:
`<opt-spec>`::
its format is the short option character, then the long option name
separated by a comma. Both parts are not required, though at least one
- is necessary. `h,help`, `dry-run` and `f` are all three correct
- `<opt-spec>`.
+ is necessary. May not contain any of the `<flags>` characters.
+ `h,help`, `dry-run` and `f` are examples of correct `<opt-spec>`.
`<flags>`::
`<flags>` are of `*`, `=`, `?` or `!`.