Re: [PATCH] describe-doc: clarify default length of abbreviation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/05/21 14.32, Anders Höckersten via GitGitGadget wrote:
 >   --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
-	will suppress long format, only showing the closest tag.
+	Instead of using the default number of hexadecimal digits (which
+	will vary according to the size of 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.

I think the more correct is the abbreviated hash length is determined
by number of objects.

  --candidates=<n>::
  	Instead of considering only the 10 most recent tags as
@@ -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.

What is the birthday paradox then?

Also, better say "... and by default the minimum length is 7.".

Thanks.

--
An old man doll... just what I always wanted! - Clara



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux