Skip to content

Commit 352611f

Browse files
committed
Merge branch 'jc/doc-long-options' into maint
* jc/doc-long-options: gitcli: parse-options lets you omit tail of long options
2 parents 26c21f8 + 30462a7 commit 352611f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Documentation/gitcli.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ ENHANCED OPTION PARSER
9393
From the git 1.5.4 series and further, many git commands (not all of them at the
9494
time of the writing though) come with an enhanced option parser.
9595

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.
9797

9898

9999
Magic Options
@@ -137,6 +137,16 @@ options. This means that you can for example use `git rm -rf` or
137137
`git clean -fdx`.
138138

139139

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+
140150
Separating argument from the option
141151
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
142152
You can write the mandatory option parameter to an option as a separate

0 commit comments

Comments
 (0)