git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git describe and "the smallest number of commits possible"

From
Stefan Beller <sbeller@google.com>
Date
Aug 28, 2017, 18:24 UTC
Message-ID
<CAGZ79kZSmJBnfcU=WWmq3VEHJBJLQJzzri07hSU-uA-VgT0t3Q@mail.gmail.com>
In-Reply-To
<CAOAAw7WsiwzQYhiU9xxcoteaEWgaXRQkiVb0Xa2WckR4=m-bFw@mail.gmail.com>

On Sat, Aug 26, 2017 at 7:47 AM, Kévin Le Gouguec <kevin.legouguec@gmail.com> wrote:

Show 17 quoted lines
> Hi,
>
> I've asked this question on the git-users Google Groups list[1], and
> while the answers there were interesting, I still cannot figure
> whether my problem comes from an actual bug, a misleading manpage, my
> inability to understand the code and/or the manpage, or a combination
> of the three.
>
> I noticed this problem on 2.1.4 (Debian oldstable); I can reproduce it
> on next (7ef03bb281b2220d0f2414365e4949beb2337042). Quoting
> git-describe(1)'s SEARCH STRATEGY section:
>
>> If multiple tags were found during the walk then the tag which has
>> the fewest commits different from the input commit-ish will be
>> selected and output. Here fewest commits different is defined as the
>> number of commits which would be shown by `git log tag..input` will
>> be the smallest number of commits possible.

Maybe relevant https://public-inbox.org/git/20160421113004.GA3140@aepfle.de/ (specifically the discussion after this patch, it sheds light on the heuristics used, though your case here doesn't use these heuristics)

Previous: Kévin Le GouguecNext: Michael J Gruber
Message 2 of 3 in “git describe and "the smallest number of commits possible"”
  1. Kévin Le GouguecAug 26, 2017
  2. Stefan BellerAug 28, 2017
  3. Michael J GruberAug 29, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.