gitcli: parse-options lets you omit tail of long options

Describe the behaviour, but do warn people against taking it too literally and expect an abbreviation valid today will stay valid forever. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Oct 4, 2012 at 10:13 UTC 30462a7483c0acf77fab6364a3f505d16b650f21
1 file changed +11 -1
Documentation/gitcli.txt
+11 -1
@@ -93,7 +93,7 @@ ENHANCED OPTION PARSER
93 From the git 1.5.4 series and further, many git commands (not all of them at the
94 time of the writing though) come with an enhanced option parser.
95
96 -Here is an exhaustive list of the facilities provided by this option parser.
96 +Here is a list of the facilities provided by this option parser.
97
98
99 Magic Options
@@ -137,6 +137,16 @@ options. This means that you can for example use `git rm -rf` or
137 `git clean -fdx`.
138
139
140 +Abbreviating long options
141 +~~~~~~~~~~~~~~~~~~~~~~~~~
142 +Commands that support the enhanced option parser accepts unique
143 +prefix of a long option as if it is fully spelled out, but use this
144 +with a caution. For example, `git commit --amen` behaves as if you
145 +typed `git commit --amend`, but that is true only until a later version
146 +of Git introduces another option that shares the same prefix,
147 +e.g `git commit --amenity" option.
148 +
149 +
150 Separating argument from the option
151 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
152 You can write the mandatory option parameter to an option as a separate