Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Höckersten <anders@hockersten.se>2021-05-17 08:53:50 +0300
committerJunio C Hamano <gitster@pobox.com>2021-05-17 09:56:29 +0300
commitbfe35a61653c5789c9038b3fe9925941cf10f623 (patch)
treeb513d2c1f9e3a465d67c3a298752ef932a267a59 /Documentation/git-describe.txt
parent0628636d0c21324ae0f11be591611c6b1e55705f (diff)
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>
Diffstat (limited to 'Documentation/git-describe.txt')
-rw-r--r--Documentation/git-describe.txt14
1 files changed, 9 insertions, 5 deletions
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index a88f6ae2c6..c6a79c2a0f 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -63,9 +63,10 @@ OPTIONS
Automatically implies --tags.
--abbrev=<n>::
- Instead of using the default 7 hexadecimal digits as the
- abbreviated object name, use <n> digits, or as many digits
- as needed to form a unique object name. An <n> of 0
+ Instead of using the default number of hexadecimal digits (which
+ will vary according to the number of objects in the repository with
+ a default of 7) of the abbreviated object name, use <n> digits, or
+ as many digits as needed to form a unique object name. An <n> of 0
will suppress long format, only showing the closest tag.
--candidates=<n>::
@@ -139,8 +140,11 @@ at the end.
The number of additional commits is the number
of commits which would be displayed by "git log v1.0.4..parent".
-The hash suffix is "-g" + unambiguous abbreviation for the tip commit
-of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`).
+The hash suffix is "-g" + an unambigous abbreviation for the tip commit
+of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`). The
+length of the abbreviation scales as the repository grows, using the
+approximate number of objects in the repository and a bit of math
+around the birthday paradox, and defaults to a minimum of 7.
The "g" prefix stands for "git" and is used to allow describing the version of
a software depending on the SCM the software is managed with. This is useful
in an environment where people may use different SCMs.