describe-doc: clarify default length of abbreviation

Clarify the default length used for the abbreviated form used for commits in git describe. The behavior was modified in Git 2.11.0, but the documentation was not updated to clarify the new behavior. Signed-off-by: Anders Höckersten <anders@hockersten.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Anders Höckersten committed May 17, 2021 at 05:53 UTC bfe35a61653c5789c9038b3fe9925941cf10f623
1 file changed +9 -5
Documentation/git-describe.txt
+9 -5
@@ -63,9 +63,10 @@ OPTIONS
63 Automatically implies --tags.
64
65 --abbrev=<n>::
66 - Instead of using the default 7 hexadecimal digits as the
67 - abbreviated object name, use <n> digits, or as many digits
68 - as needed to form a unique object name. An <n> of 0
66 + Instead of using the default number of hexadecimal digits (which
67 + will vary according to the number of objects in the repository with
68 + a default of 7) of the abbreviated object name, use <n> digits, or
69 + as many digits as needed to form a unique object name. An <n> of 0
70 will suppress long format, only showing the closest tag.
71
72 --candidates=<n>::
@@ -139,8 +140,11 @@ at the end.
140
141 The number of additional commits is the number
142 of commits which would be displayed by "git log v1.0.4..parent".
142 -The hash suffix is "-g" + unambiguous abbreviation for the tip commit
143 -of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`).
143 +The hash suffix is "-g" + an unambigous abbreviation for the tip commit
144 +of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`). The
145 +length of the abbreviation scales as the repository grows, using the
146 +approximate number of objects in the repository and a bit of math
147 +around the birthday paradox, and defaults to a minimum of 7.
148 The "g" prefix stands for "git" and is used to allow describing the version of
149 a software depending on the SCM the software is managed with. This is useful
150 in an environment where people may use different SCMs.