threads / discuss / 33727

git describe not showing "nearest" tag

Subject: git describe not showing "nearest" tag

## tl;dr

3 messages between May 5, 2013 and May 5, 2013.

replies: 2people: 2as markdown or json

Jed Brown· May 5, 2013, 04:48 UTC · lore

$ git rev-list --count v3.2..master 9651 $ git rev-list --count v3.3..master 6378 $ git describe --tags master v3.2-9651-ga018267

I would have expected to see v3.3-6378-ga018267, given the documentation:
  If multiple tags were found during the walk then the tag which has the
  fewest commits different from the input committish 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.
What's going on here?
The repository: https://bitbucket.org/petsc/petsc

This repository currently uses only lightweight tags. As an experiment, I replaced both v3.2 and v3.3 with annotated tags, but it did not affect the 'git describe' output.

Junio C Hamano· May 5, 2013, 06:42 UTC · re: Jed Brown · lore

Re: git describe not showing "nearest" tag

Jed Brown <jed@59A2.org> writes:
Show 6 quoted lines
> $ git rev-list --count v3.2..master
> 9651
> $ git rev-list --count v3.3..master
> 6378
> $ git describe --tags master
> v3.2-9651-ga018267
Is 'master' a descendant of v3.3?  I.e. what does
	git rev-list master..v3.3
say?
Jed Brown· May 5, 2013, 09:50 UTC · re: Junio C Hamano · lore

Re: git describe not showing "nearest" tag

Junio C Hamano <gitster@pobox.com> writes:
Show 5 quoted lines
> Is 'master' a descendant of v3.3?  I.e. what does
>
> 	git rev-list master..v3.3
>
> say?

Yes, this shows nothing. Although 'master' is a descendant of v3.3, it is not a --first-parent descendant of anything after v3.0.0.

← back to recent threads