Skip to content

Commit 478d3c3

Browse files
committed
Merge branch 'ah/doc-rev-parse-short-default' into maint
Doc update. * ah/doc-rev-parse-short-default: doc: rewrite description for rev-parse --short
2 parents f166aab + fb87327 commit 478d3c3

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Documentation/config.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,7 @@ core.abbrev::
873873
computed based on the approximate number of packed objects
874874
in your repository, which hopefully is enough for
875875
abbreviated object names to stay unique for some time.
876+
The minimum length is 4.
876877

877878
add.ignoreErrors::
878879
add.ignore-errors (deprecated)::

Documentation/git-rev-parse.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ can be used.
126126
'git diff-{asterisk}'). In contrast to the `--sq-quote` option,
127127
the command input is still interpreted as usual.
128128

129+
--short[=length]::
130+
Same as `--verify` but shortens the object name to a unique
131+
prefix with at least `length` characters. The minimum length
132+
is 4, the default is the effective value of the `core.abbrev`
133+
configuration variable (see linkgit:git-config[1]).
134+
129135
--not::
130136
When showing object names, prefix them with '{caret}' and
131137
strip '{caret}' prefix from the object names that already have
@@ -136,12 +142,6 @@ can be used.
136142
The option core.warnAmbiguousRefs is used to select the strict
137143
abbreviation mode.
138144

139-
--short::
140-
--short=number::
141-
Instead of outputting the full SHA-1 values of object names try to
142-
abbreviate them to a shorter unique name. When no length is specified
143-
7 is used. The minimum length is 4.
144-
145145
--symbolic::
146146
Usually the object names are output in SHA-1 form (with
147147
possible '{caret}' prefix); this option makes them output in a

0 commit comments

Comments
 (0)