Skip to content

Commit

Permalink
Merge branch 'jc/doc-long-options' into maint
Browse files Browse the repository at this point in the history
* jc/doc-long-options:
  gitcli: parse-options lets you omit tail of long options
  • Loading branch information
gitster committed Oct 17, 2012
2 parents 26c21f8 + 30462a7 commit 352611f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Documentation/gitcli.txt
Expand Up @@ -93,7 +93,7 @@ ENHANCED OPTION PARSER
From the git 1.5.4 series and further, many git commands (not all of them at the
time of the writing though) come with an enhanced option parser.

Here is an exhaustive list of the facilities provided by this option parser.
Here is a list of the facilities provided by this option parser.


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


Abbreviating long options
~~~~~~~~~~~~~~~~~~~~~~~~~
Commands that support the enhanced option parser accepts unique
prefix of a long option as if it is fully spelled out, but use this
with a caution. For example, `git commit --amen` behaves as if you
typed `git commit --amend`, but that is true only until a later version
of Git introduces another option that shares the same prefix,
e.g `git commit --amenity" option.


Separating argument from the option
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can write the mandatory option parameter to an option as a separate
Expand Down

0 comments on commit 352611f

Please sign in to comment.