doc: rewrite description for rev-parse --short
authorAndreas Heiduk <asheiduk@gmail.com>
Wed, 31 May 2017 21:39:29 +0000 (23:39 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 1 Jun 2017 01:37:42 +0000 (10:37 +0900)
`git rev-parse --short` is not a generic modifier but just a variant
of `--verify` and considers the given length only as a suggestion to
ensure uniqueness.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt
Documentation/git-rev-parse.txt
index 475e874d51550eba26a578c0ce3b17b61384fddc..4865ac92e8e0bec0c4a9616adb95725475a4a61f 100644 (file)
@@ -862,6 +862,7 @@ core.abbrev::
        computed based on the approximate number of packed objects
        in your repository, which hopefully is enough for
        abbreviated object names to stay unique for some time.
        computed based on the approximate number of packed objects
        in your repository, which hopefully is enough for
        abbreviated object names to stay unique for some time.
+       The minimum length is 4.
 
 add.ignoreErrors::
 add.ignore-errors (deprecated)::
 
 add.ignoreErrors::
 add.ignore-errors (deprecated)::
index c40c4704486dd9d1a5650562540db7379818ab03..b1293f24bb46f71238f3dee4700340a79b90fca8 100644 (file)
@@ -126,6 +126,12 @@ can be used.
        'git diff-{asterisk}'). In contrast to the `--sq-quote` option,
        the command input is still interpreted as usual.
 
        'git diff-{asterisk}'). In contrast to the `--sq-quote` option,
        the command input is still interpreted as usual.
 
+--short[=length]::
+       Same as `--verify` but shortens the object name to a unique
+       prefix with at least `length` characters. The minimum length
+       is 4, the default is the effective value of the `core.abbrev`
+       configuration variable (see linkgit:git-config[1]).
+
 --not::
        When showing object names, prefix them with '{caret}' and
        strip '{caret}' prefix from the object names that already have
 --not::
        When showing object names, prefix them with '{caret}' and
        strip '{caret}' prefix from the object names that already have
@@ -136,12 +142,6 @@ can be used.
        The option core.warnAmbiguousRefs is used to select the strict
        abbreviation mode.
 
        The option core.warnAmbiguousRefs is used to select the strict
        abbreviation mode.
 
---short::
---short=number::
-       Instead of outputting the full SHA-1 values of object names try to
-       abbreviate them to a shorter unique name. When no length is specified
-       7 is used. The minimum length is 4.
-
 --symbolic::
        Usually the object names are output in SHA-1 form (with
        possible '{caret}' prefix); this option makes them output in a
 --symbolic::
        Usually the object names are output in SHA-1 form (with
        possible '{caret}' prefix); this option makes them output in a