Web lists-archives.com

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

On Sat, Aug 26, 2017 at 7:47 AM, Kévin Le Gouguec
<kevin.legouguec@xxxxxxxxx> wrote:
> 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
(specifically the discussion after this patch, it sheds light on the
heuristics used, though your case here doesn't use these heuristics)