{"thread":{"id":"55700","subject":"[PATCH] describe-doc: clarify default length of abbreviation","startedAt":"2021-05-16T07:32:52Z","lastAt":"2021-05-17T16:51:16Z","messageCount":11,"participants":["Anders Höckersten via GitGitGadget","Junio C Hamano","Bagas Sanjaya","Anders Höckersten","Felipe Contreras","Robert P. J. Day","Derrick Stolee"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"424675","messageId":"pull.1026.git.git.1621150366442.gitgitgadget@gmail.com","threadId":"55700","inReplyTo":null,"subject":"[PATCH] describe-doc: clarify default length of abbreviation","fromName":"Anders Höckersten via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-05-16T07:32:45Z","receivedAt":"2021-05-16T07:32:52Z","isPatch":true,"sender":{"key":"anders@hockersten.se","avatar":"https://avatars.githubusercontent.com/u/186791?v=4"},"body":"From: =?UTF-8?q?Anders=20H=C3=B6ckersten?= <anders@hockersten.se>\n\nClarify the default length used for the abbreviated form used for\ncommits in git describe.\n\nThe behavior was modified in Git 2.11.0, but the documentation was not\nupdated to clarify the new behavior.\n\nSigned-off-by: Anders Höckersten <anders@hockersten.se>\n---\n    describe-doc: clarify default length of abbreviation\n    \n    Clarify the default length used for the abbreviated form used for\n    commits in git describe.\n    \n    The behavior was modified in Git 2.11.0, but the documentation was not\n    updated to clarify the new behavior.\n    \n    Signed-off-by: Anders Höckersten anders@hockersten.se\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1026%2Fahockersten%2Fdescribe-doc-abbreviation-clarification-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1026/ahockersten/describe-doc-abbreviation-clarification-v1\nPull-Request: https://github.com/git/git/pull/1026\n\n Documentation/git-describe.txt | 16 ++++++++++------\n 1 file changed, 10 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt\nindex a88f6ae2c6e7..f3f41cfac496 100644\n--- a/Documentation/git-describe.txt\n+++ b/Documentation/git-describe.txt\n@@ -63,10 +63,11 @@ OPTIONS\n \tAutomatically implies --tags.\n \n --abbrev=<n>::\n-\tInstead of using the default 7 hexadecimal digits as the\n-\tabbreviated object name, use <n> digits, or as many digits\n-\tas needed to form a unique object name.  An <n> of 0\n-\twill suppress long format, only showing the closest tag.\n+\tInstead of using the default number of hexadecimal digits (which\n+\twill vary according to the size of the repository with a default of \n+\t7) of the abbreviated object name, use <n> digits, or as many digits\n+\tas needed to form a unique object name.  An <n> of 0 will suppress \n+\tlong format, only showing the closest tag.\n \n --candidates=<n>::\n \tInstead of considering only the 10 most recent tags as\n@@ -139,8 +140,11 @@ at the end.\n \n The number of additional commits is the number\n of commits which would be displayed by \"git log v1.0.4..parent\".\n-The hash suffix is \"-g\" + unambiguous abbreviation for the tip commit\n-of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`).\n+The hash suffix is \"-g\" + an unambigous abbreviation for the tip commit\n+of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`). The \n+length of the abbreviation scales as the repository grows, using the \n+approximate number of objects in the repository and a bit of math \n+around the birthday paradox, and defaults to a minimum of 7.\n The \"g\" prefix stands for \"git\" and is used to allow describing the version of\n a software depending on the SCM the software is managed with. This is useful\n in an environment where people may use different SCMs.\n\nbase-commit: 48bf2fa8bad054d66bd79c6ba903c89c704201f7\n-- \ngitgitgadget\n"},{"id":"424677","messageId":"xmqq7djy7vzm.fsf@gitster.g","threadId":"55700","inReplyTo":"pull.1026.git.git.1621150366442.gitgitgadget@gmail.com","subject":"Re: [PATCH] describe-doc: clarify default length of abbreviation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-05-16T11:34:37Z","receivedAt":"2021-05-16T11:34:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Anders Höckersten via GitGitGadget\"  <gitgitgadget@gmail.com>\nwrites:\n\n> From: =?UTF-8?q?Anders=20H=C3=B6ckersten?= <anders@hockersten.se>\n>\n> Clarify the default length used for the abbreviated form used for\n> commits in git describe.\n>\n> The behavior was modified in Git 2.11.0, but the documentation was not\n> updated to clarify the new behavior.\n>\n> Signed-off-by: Anders Höckersten <anders@hockersten.se>\n> ---\n>     describe-doc: clarify default length of abbreviation\n>     \n>     Clarify the default length used for the abbreviated form used for\n>     commits in git describe.\n>     \n>     The behavior was modified in Git 2.11.0, but the documentation was not\n>     updated to clarify the new behavior.\n>     \n>     Signed-off-by: Anders Höckersten anders@hockersten.se\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1026%2Fahockersten%2Fdescribe-doc-abbreviation-clarification-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1026/ahockersten/describe-doc-abbreviation-clarification-v1\n> Pull-Request: https://github.com/git/git/pull/1026\n\n\n.git/rebase-apply/patch:32: trailing whitespace.\n\twill vary according to the size of the repository with a default of \n.git/rebase-apply/patch:34: trailing whitespace.\n\tas needed to form a unique object name.  An <n> of 0 will suppress \n.git/rebase-apply/patch:46: trailing whitespace.\nof parent (which was `2414721b194453f058079d897d13c4e377f92dc6`). The \n.git/rebase-apply/patch:47: trailing whitespace.\nlength of the abbreviation scales as the repository grows, using the \n.git/rebase-apply/patch:48: trailing whitespace.\napproximate number of objects in the repository and a bit of math \nwarning: 5 lines applied after fixing whitespace errors.\nApplying: describe-doc: clarify default length of abbreviation\n\nWill fix them up while applying, but please be careful the next\ntime.  A good way to double check is to do\n\n    $ git format-patch -o my.patch origin..\n    $ git checkout --detach origin\n    $ git am --whitespace=warn my.patch\n\nthat is, (1) create a patch series out of the branch you have worked\non, designed to be applied on top of the origin, (2) detach HEAD at\nthe origin, and (3) apply the patch.  Once you are done, you can go\nback to the original branch with\n\n    $ git checkout -\n\nThe patch text looks good.\n\nThanks.\n\n\n>  Documentation/git-describe.txt | 16 ++++++++++------\n>  1 file changed, 10 insertions(+), 6 deletions(-)\n>\n> diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt\n> index a88f6ae2c6e7..f3f41cfac496 100644\n> --- a/Documentation/git-describe.txt\n> +++ b/Documentation/git-describe.txt\n> @@ -63,10 +63,11 @@ OPTIONS\n>  \tAutomatically implies --tags.\n>  \n>  --abbrev=<n>::\n> -\tInstead of using the default 7 hexadecimal digits as the\n> -\tabbreviated object name, use <n> digits, or as many digits\n> -\tas needed to form a unique object name.  An <n> of 0\n> -\twill suppress long format, only showing the closest tag.\n> +\tInstead of using the default number of hexadecimal digits (which\n> +\twill vary according to the size of the repository with a default of \n> +\t7) of the abbreviated object name, use <n> digits, or as many digits\n> +\tas needed to form a unique object name.  An <n> of 0 will suppress \n> +\tlong format, only showing the closest tag.\n>  \n>  --candidates=<n>::\n>  \tInstead of considering only the 10 most recent tags as\n> @@ -139,8 +140,11 @@ at the end.\n>  \n>  The number of additional commits is the number\n>  of commits which would be displayed by \"git log v1.0.4..parent\".\n> -The hash suffix is \"-g\" + unambiguous abbreviation for the tip commit\n> -of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`).\n> +The hash suffix is \"-g\" + an unambigous abbreviation for the tip commit\n> +of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`). The \n> +length of the abbreviation scales as the repository grows, using the \n> +approximate number of objects in the repository and a bit of math \n> +around the birthday paradox, and defaults to a minimum of 7.\n>  The \"g\" prefix stands for \"git\" and is used to allow describing the version of\n>  a software depending on the SCM the software is managed with. This is useful\n>  in an environment where people may use different SCMs.\n>\n> base-commit: 48bf2fa8bad054d66bd79c6ba903c89c704201f7\n"},{"id":"424678","messageId":"1dc7877e-adb4-e3f5-3b59-bd45f9673596@gmail.com","threadId":"55700","inReplyTo":"pull.1026.git.git.1621150366442.gitgitgadget@gmail.com","subject":"Re: [PATCH] describe-doc: clarify default length of abbreviation","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2021-05-16T12:00:15Z","receivedAt":"2021-05-16T12:00:21Z","isPatch":true,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"On 16/05/21 14.32, Anders Höckersten via GitGitGadget wrote:\n  >   --abbrev=<n>::\n> -\tInstead of using the default 7 hexadecimal digits as the\n> -\tabbreviated object name, use <n> digits, or as many digits\n> -\tas needed to form a unique object name.  An <n> of 0\n> -\twill suppress long format, only showing the closest tag.\n> +\tInstead of using the default number of hexadecimal digits (which\n> +\twill vary according to the size of the repository with a default of\n> +\t7) of the abbreviated object name, use <n> digits, or as many digits\n> +\tas needed to form a unique object name.  An <n> of 0 will suppress\n> +\tlong format, only showing the closest tag.\n>   \n\nI think the more correct is the abbreviated hash length is determined\nby number of objects.\n\n>   --candidates=<n>::\n>   \tInstead of considering only the 10 most recent tags as\n> @@ -139,8 +140,11 @@ at the end.\n>   \n>   The number of additional commits is the number\n>   of commits which would be displayed by \"git log v1.0.4..parent\".\n> -The hash suffix is \"-g\" + unambiguous abbreviation for the tip commit\n> -of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`).\n> +The hash suffix is \"-g\" + an unambigous abbreviation for the tip commit\n> +of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`). The\n> +length of the abbreviation scales as the repository grows, using the\n> +approximate number of objects in the repository and a bit of math\n> +around the birthday paradox, and defaults to a minimum of 7.\n\nWhat is the birthday paradox then?\n\nAlso, better say \"... and by default the minimum length is 7.\".\n\nThanks.\n\n-- \nAn old man doll... just what I always wanted! - Clara\n"},{"id":"424680","messageId":"8cad4c4b-a923-43f2-9bb7-6ce418cfb0fc@www.fastmail.com","threadId":"55700","inReplyTo":"1dc7877e-adb4-e3f5-3b59-bd45f9673596@gmail.com","subject":"Re: [PATCH] describe-doc: clarify default length of abbreviation","fromName":"Anders Höckersten","fromEmail":"anders@hockersten.se","sentAt":"2021-05-16T12:47:49Z","receivedAt":"2021-05-16T12:48:11Z","isPatch":true,"sender":{"key":"anders@hockersten.se","avatar":"https://avatars.githubusercontent.com/u/186791?v=4"},"body":"\n\nOn Sun, May 16, 2021, at 14:00, Bagas Sanjaya wrote:\n> On 16/05/21 14.32, Anders Höckersten via GitGitGadget wrote:\n>   >   --abbrev=<n>::\n> > -\tInstead of using the default 7 hexadecimal digits as the\n> > -\tabbreviated object name, use <n> digits, or as many digits\n> > -\tas needed to form a unique object name.  An <n> of 0\n> > -\twill suppress long format, only showing the closest tag.\n> > +\tInstead of using the default number of hexadecimal digits (which\n> > +\twill vary according to the size of the repository with a default of\n> > +\t7) of the abbreviated object name, use <n> digits, or as many digits\n> > +\tas needed to form a unique object name.  An <n> of 0 will suppress\n> > +\tlong format, only showing the closest tag.\n> >   \n> \n> I think the more correct is the abbreviated hash length is determined\n> by number of objects.\n\nI 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.\n\n> >   --candidates=<n>::\n> >   \tInstead of considering only the 10 most recent tags as\n> > @@ -139,8 +140,11 @@ at the end.\n> >   \n> >   The number of additional commits is the number\n> >   of commits which would be displayed by \"git log v1.0.4..parent\".\n> > -The hash suffix is \"-g\" + unambiguous abbreviation for the tip commit\n> > -of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`).\n> > +The hash suffix is \"-g\" + an unambigous abbreviation for the tip commit\n> > +of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`). The\n> > +length of the abbreviation scales as the repository grows, using the\n> > +approximate number of objects in the repository and a bit of math\n> > +around the birthday paradox, and defaults to a minimum of 7.\n> \n> What is the birthday paradox then?\n> \n> Also, better say \"... and by default the minimum length is 7.\".\n\nThe explanation was mostly copied from the 2.11.0 release notes, but mentioning the birtday paradox is unnecessary. I suggest changing this sentence to:\n\"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.\"\n\nBest regards,\nAnders\n"},{"id":"424682","messageId":"xmqqo8da6dk4.fsf@gitster.g","threadId":"55700","inReplyTo":"8cad4c4b-a923-43f2-9bb7-6ce418cfb0fc@www.fastmail.com","subject":"Re: [PATCH] describe-doc: clarify default length of abbreviation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-05-16T12:58:03Z","receivedAt":"2021-05-16T12:58:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Anders Höckersten <anders@hockersten.se> writes:\n\n> The explanation was mostly copied from the 2.11.0 release notes,\n> but mentioning the birtday paradox is unnecessary. I suggest\n> changing this sentence to: \"The length of the abbreviation scales\n> as the repository grows using the approximate number of objects in\n> the repository, and by default the minimum length is 7.\"\n\nHeh.  In my priate review, I said that I very much liked the way the\nnew description was phrased with \"a bit of math around the birthday\nparadox\".  Now I know why I liked that phrasing---it turns out to be\nmy own ;-)\n\nI don't mind with or without mention of the birthday math.  Thanks\nfor working on this.\n\n"},{"id":"424687","messageId":"60a1699eedcd4_109fc7208e1@natae.notmuch","threadId":"55700","inReplyTo":"1dc7877e-adb4-e3f5-3b59-bd45f9673596@gmail.com","subject":"Re: [PATCH] describe-doc: clarify default length of abbreviation","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2021-05-16T18:51:10Z","receivedAt":"2021-05-16T19:00:22Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Bagas Sanjaya wrote:\n> On 16/05/21 14.32, Anders Höckersten via GitGitGadget wrote:\n> > @@ -139,8 +140,11 @@ at the end.\n> >   \n> >   The number of additional commits is the number\n> >   of commits which would be displayed by \"git log v1.0.4..parent\".\n> > -The hash suffix is \"-g\" + unambiguous abbreviation for the tip commit\n> > -of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`).\n> > +The hash suffix is \"-g\" + an unambigous abbreviation for the tip commit\n> > +of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`). The\n> > +length of the abbreviation scales as the repository grows, using the\n> > +approximate number of objects in the repository and a bit of math\n> > +around the birthday paradox, and defaults to a minimum of 7.\n> \n> What is the birthday paradox then?\n\nIt's a probability fact that goes against common sense. In a romm with 23\npeople you are 50% likely to find two people with the same birthday.\n\nhttps://en.wikipedia.org/wiki/Birthday_problem\n\n-- \nFelipe Contreras"},{"id":"424688","messageId":"7ab75f6a-14a8-1aa7-ad0-20f484e2c8@crashcourse.ca","threadId":"55700","inReplyTo":"60a1699eedcd4_109fc7208e1@natae.notmuch","subject":"Re: [PATCH] describe-doc: clarify default length of abbreviation","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2021-05-16T19:00:21Z","receivedAt":"2021-05-16T19:00:41Z","isPatch":true,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"On Sun, 16 May 2021, Felipe Contreras wrote:\n\n> Bagas Sanjaya wrote:\n> > On 16/05/21 14.32, Anders Höckersten via GitGitGadget wrote:\n> > > @@ -139,8 +140,11 @@ at the end.\n> > >\n> > >   The number of additional commits is the number\n> > >   of commits which would be displayed by \"git log v1.0.4..parent\".\n> > > -The hash suffix is \"-g\" + unambiguous abbreviation for the tip commit\n> > > -of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`).\n> > > +The hash suffix is \"-g\" + an unambigous abbreviation for the tip commit\n> > > +of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`). The\n> > > +length of the abbreviation scales as the repository grows, using the\n> > > +approximate number of objects in the repository and a bit of math\n> > > +around the birthday paradox, and defaults to a minimum of 7.\n> >\n> > What is the birthday paradox then?\n>\n> It's a probability fact that goes against common sense. In a romm\n> with 23 people you are 50% likely to find two people with the same\n> birthday.\n>\n> https://en.wikipedia.org/wiki/Birthday_problem\n\n  i've had to explain the logic behind this to people who really have\na tough time understanding this, and it's a concept that applies in a\nlot of places (surprisingly).\n\n  what trips people up is thinking they need to calculate the\nprobability that two or more people have the same birthday.\n\n  no.\n\n  what you want to do is calculate the ongoing probability that each\nperson's birthday is *different* from all the earlier ones. as in:\n\n  * prob that 2nd person has a different bday is 364/365\n  * prob that 3rd person has a different bday is 363/365\n  * prob that 4th person has a different bday is 362/365\n\nand so on, and as you multiply those together, it's right at 23 people\nthat the chance that that person has a different bday from all earlier\nones drops below 50%.\n\n  what's neat is that this way of looking at things applies in a lot\nof places.\n\nrday"},{"id":"424691","messageId":"CAMP44s3AKCTjHshRz7Nc4KzSj3orBrrV24V1tb1gs3=Yh=PhSA@mail.gmail.com","threadId":"55700","inReplyTo":"7ab75f6a-14a8-1aa7-ad0-20f484e2c8@crashcourse.ca","subject":"Re: [PATCH] describe-doc: clarify default length of abbreviation","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2021-05-16T21:07:06Z","receivedAt":"2021-05-16T21:09:39Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Sun, May 16, 2021 at 2:00 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n> On Sun, 16 May 2021, Felipe Contreras wrote:\n> > Bagas Sanjaya wrote:\n\n> > > What is the birthday paradox then?\n> >\n> > It's a probability fact that goes against common sense. In a romm\n> > with 23 people you are 50% likely to find two people with the same\n> > birthday.\n> >\n> > https://en.wikipedia.org/wiki/Birthday_problem\n>\n>   i've had to explain the logic behind this to people who really have\n> a tough time understanding this, and it's a concept that applies in a\n> lot of places (surprisingly).\n\nIndeed. Very very few people actually understand probability. Any\nintuition you have is almost always wrong. Even professional\nprobabilists get probability wrong consistently.\n\nI've found it's safer and easier to not trust my intuition, write\ncode, and that way get the probability (also called Monte Carlo\nmethod).\n\nI have a git repository with tricky simulations and I actually had\nwritten one for the birthday paradox, but I had not pushed it. Now I\nhave [1].\n\nThe actual code is just two lines:\n\n  birthdays = Array.new($n) { rand(365.25) }\n  birthdays.any? { |e| birthdays.count(e) > 1 }\n\nYet our brain somehow has trouble figuring out the approximate result\nof that computation.\n\nCheers.\n\n[1] https://github.com/felipec/simulation/blob/master/examples/birthday\n\n-- \nFelipe Contreras\n"},{"id":"424698","messageId":"6306f894-4fda-4412-9b1b-6fcd9eed8e77@www.fastmail.com","threadId":"55700","inReplyTo":"xmqqo8da6dk4.fsf@gitster.g","subject":"Re: [PATCH] describe-doc: clarify default length of abbreviation","fromName":"Anders Höckersten","fromEmail":"anders@hockersten.se","sentAt":"2021-05-17T05:51:28Z","receivedAt":"2021-05-17T05:51:51Z","isPatch":true,"sender":{"key":"anders@hockersten.se","avatar":"https://avatars.githubusercontent.com/u/186791?v=4"},"body":"\n\nOn Sun, May 16, 2021, at 14:58, Junio C Hamano wrote:\n> Anders Höckersten <anders@hockersten.se> writes:\n> \n> > The explanation was mostly copied from the 2.11.0 release notes,\n> > but mentioning the birtday paradox is unnecessary. I suggest\n> > changing this sentence to: \"The length of the abbreviation scales\n> > as the repository grows using the approximate number of objects in\n> > the repository, and by default the minimum length is 7.\"\n> \n> Heh.  In my priate review, I said that I very much liked the way the\n> new description was phrased with \"a bit of math around the birthday\n> paradox\".  Now I know why I liked that phrasing---it turns out to be\n> my own ;-)\n> \n> I don't mind with or without mention of the birthday math.  Thanks\n> for working on this.\n\nActually, changed my mind again. I like the phrasing and it's in the \"examples\" section so a bit of verbosity doesn't hurt. Will submit a new patch with the other changes mentioned + whitespace fixes momentarily.\n\n/A\n"},{"id":"424699","messageId":"pull.1026.v2.git.git.1621230831465.gitgitgadget@gmail.com","threadId":"55700","inReplyTo":"pull.1026.git.git.1621150366442.gitgitgadget@gmail.com","subject":"[PATCH v2] describe-doc: clarify default length of abbreviation","fromName":"Anders Höckersten via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-05-17T05:53:50Z","receivedAt":"2021-05-17T05:53:56Z","isPatch":true,"sender":{"key":"anders@hockersten.se","avatar":"https://avatars.githubusercontent.com/u/186791?v=4"},"body":"From: =?UTF-8?q?Anders=20H=C3=B6ckersten?= <anders@hockersten.se>\n\nClarify the default length used for the abbreviated form used for\ncommits in git describe.\n\nThe behavior was modified in Git 2.11.0, but the documentation was not\nupdated to clarify the new behavior.\n\nSigned-off-by: Anders Höckersten <anders@hockersten.se>\n---\n    describe-doc: clarify default length of abbreviation\n    \n    Clarify the default length used for the abbreviated form used for\n    commits in git describe.\n    \n    The behavior was modified in Git 2.11.0, but the documentation was not\n    updated to clarify the new behavior.\n    \n    Changes since v1:\n    \n     * tweaked the wording in --abbrev parameter to better match\n       implementation, as suggested by Bagas Sanjaya\n     * trailing whitespace removed\n    \n    Signed-off-by: Anders Höckersten anders@hockersten.se\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1026%2Fahockersten%2Fdescribe-doc-abbreviation-clarification-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1026/ahockersten/describe-doc-abbreviation-clarification-v2\nPull-Request: https://github.com/git/git/pull/1026\n\nRange-diff vs v1:\n\n 1:  a3aa09ab6fca ! 1:  4cf527801901 describe-doc: clarify default length of abbreviation\n     @@ Documentation/git-describe.txt: OPTIONS\n      -\tInstead of using the default 7 hexadecimal digits as the\n      -\tabbreviated object name, use <n> digits, or as many digits\n      -\tas needed to form a unique object name.  An <n> of 0\n     --\twill suppress long format, only showing the closest tag.\n      +\tInstead of using the default number of hexadecimal digits (which\n     -+\twill vary according to the size of the repository with a default of \n     -+\t7) of the abbreviated object name, use <n> digits, or as many digits\n     -+\tas needed to form a unique object name.  An <n> of 0 will suppress \n     -+\tlong format, only showing the closest tag.\n     ++\twill vary according to the number of objects in the repository with\n     ++\ta default of 7) of the abbreviated object name, use <n> digits, or\n     ++\tas many digits as needed to form a unique object name. An <n> of 0\n     + \twill suppress long format, only showing the closest tag.\n       \n       --candidates=<n>::\n     - \tInstead of considering only the 10 most recent tags as\n      @@ Documentation/git-describe.txt: at the end.\n       \n       The number of additional commits is the number\n     @@ Documentation/git-describe.txt: at the end.\n      -The hash suffix is \"-g\" + unambiguous abbreviation for the tip commit\n      -of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`).\n      +The hash suffix is \"-g\" + an unambigous abbreviation for the tip commit\n     -+of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`). The \n     -+length of the abbreviation scales as the repository grows, using the \n     -+approximate number of objects in the repository and a bit of math \n     ++of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`). The\n     ++length of the abbreviation scales as the repository grows, using the\n     ++approximate number of objects in the repository and a bit of math\n      +around the birthday paradox, and defaults to a minimum of 7.\n       The \"g\" prefix stands for \"git\" and is used to allow describing the version of\n       a software depending on the SCM the software is managed with. This is useful\n\n\n Documentation/git-describe.txt | 14 +++++++++-----\n 1 file changed, 9 insertions(+), 5 deletions(-)\n\ndiff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt\nindex a88f6ae2c6e7..c6a79c2a0f29 100644\n--- a/Documentation/git-describe.txt\n+++ b/Documentation/git-describe.txt\n@@ -63,9 +63,10 @@ OPTIONS\n \tAutomatically implies --tags.\n \n --abbrev=<n>::\n-\tInstead of using the default 7 hexadecimal digits as the\n-\tabbreviated object name, use <n> digits, or as many digits\n-\tas needed to form a unique object name.  An <n> of 0\n+\tInstead of using the default number of hexadecimal digits (which\n+\twill vary according to the number of objects in the repository with\n+\ta default of 7) of the abbreviated object name, use <n> digits, or\n+\tas many digits as needed to form a unique object name. An <n> of 0\n \twill suppress long format, only showing the closest tag.\n \n --candidates=<n>::\n@@ -139,8 +140,11 @@ at the end.\n \n The number of additional commits is the number\n of commits which would be displayed by \"git log v1.0.4..parent\".\n-The hash suffix is \"-g\" + unambiguous abbreviation for the tip commit\n-of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`).\n+The hash suffix is \"-g\" + an unambigous abbreviation for the tip commit\n+of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`). The\n+length of the abbreviation scales as the repository grows, using the\n+approximate number of objects in the repository and a bit of math\n+around the birthday paradox, and defaults to a minimum of 7.\n The \"g\" prefix stands for \"git\" and is used to allow describing the version of\n a software depending on the SCM the software is managed with. This is useful\n in an environment where people may use different SCMs.\n\nbase-commit: 48bf2fa8bad054d66bd79c6ba903c89c704201f7\n-- \ngitgitgadget\n"},{"id":"424760","messageId":"4d101a5d-3ee7-5601-2de1-4a8afeeaaec4@gmail.com","threadId":"55700","inReplyTo":"pull.1026.v2.git.git.1621230831465.gitgitgadget@gmail.com","subject":"Re: [PATCH v2] describe-doc: clarify default length of abbreviation","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2021-05-17T16:44:58Z","receivedAt":"2021-05-17T16:51:16Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 5/17/2021 1:53 AM, Anders Höckersten via GitGitGadget wrote:\n> From: =?UTF-8?q?Anders=20H=C3=B6ckersten?= <anders@hockersten.se>\n> \n> Clarify the default length used for the abbreviated form used for\n> commits in git describe.\n> \n> The behavior was modified in Git 2.11.0, but the documentation was not\n> updated to clarify the new behavior.\n\nI'm a bit late to the party, but am interested in our abbreviation\ncode. I found these updates to be sensible, and that you appropriately\nadjusted from v1 according to the feedback.\n\nThanks,\n-Stolee\n"}]}