Re: [PATCH] describe-doc: clarify default length of abbreviation
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- May 16, 2021, 18:51 UTC
- Message-ID
- <60a1699eedcd4_109fc7208e1@natae.notmuch>
- In-Reply-To
- <1dc7877e-adb4-e3f5-3b59-bd45f9673596@gmail.com>
Bagas Sanjaya wrote:
Show 14 quoted lines
> On 16/05/21 14.32, Anders Höckersten via GitGitGadget wrote: > > @@ -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?
It's a probability fact that goes against common sense. In a romm with 23 people you are 50% likely to find two people with the same birthday.
https://en.wikipedia.org/wiki/Birthday_problem
-- Felipe Contreras