From: "Anders Höckersten" <firstname.lastname@example.org> To: "Bagas Sanjaya" <email@example.com>, "Anders Höckersten via GitGitGadget" <firstname.lastname@example.org>, email@example.com Subject: Re: [PATCH] describe-doc: clarify default length of abbreviation Date: Sun, 16 May 2021 14:47:49 +0200 [thread overview] Message-ID: <firstname.lastname@example.org> (raw) In-Reply-To: <email@example.com> On Sun, May 16, 2021, at 14:00, Bagas Sanjaya wrote: > 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. I agree. I will modify this to: "(which will vary according to the number of objects in the repository with a default of 7)" unless you have a different suggestion. > > --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.". The explanation was mostly copied from the 2.11.0 release notes, but mentioning the birtday paradox is unnecessary. I suggest changing this sentence to: "The length of the abbreviation scales as the repository grows using the approximate number of objects in the repository, and by default the minimum length is 7." Best regards, Anders
next prev parent reply other threads:[~2021-05-16 12:48 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-16 7:32 Anders Höckersten via GitGitGadget 2021-05-16 11:34 ` Junio C Hamano 2021-05-16 12:00 ` Bagas Sanjaya 2021-05-16 12:47 ` Anders Höckersten [this message] 2021-05-16 12:58 ` Junio C Hamano 2021-05-17 5:51 ` Anders Höckersten 2021-05-16 18:51 ` Felipe Contreras 2021-05-16 19:00 ` Robert P. J. Day 2021-05-16 21:07 ` Felipe Contreras 2021-05-17 5:53 ` [PATCH v2] " Anders Höckersten via GitGitGadget 2021-05-17 16:44 ` Derrick Stolee
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [PATCH] describe-doc: clarify default length of abbreviation' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).