summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-10-04 17:13:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-10-05 03:30:27 (GMT)
commit30462a7483c0acf77fab6364a3f505d16b650f21 (patch)
tree5b058183ff6070886f77fbf330cb1a16ceee5fd9
parentbafc478f1618534fcb85bedc0fa224bd2d462441 (diff)
downloadgit-30462a7483c0acf77fab6364a3f505d16b650f21.zip
git-30462a7483c0acf77fab6364a3f505d16b650f21.tar.gz
git-30462a7483c0acf77fab6364a3f505d16b650f21.tar.bz2
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>
-rw-r--r--Documentation/gitcli.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/Documentation/gitcli.txt b/Documentation/gitcli.txt
index f6ba90c..3bc1500 100644
--- a/Documentation/gitcli.txt
+++ b/Documentation/gitcli.txt
@@ -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
@@ -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