# git describe not showing "nearest" tag

3 messages from 2013-05-05 to 2013-05-05. Participants: Jed Brown, Junio C Hamano.
Thread: https://gitlist.dev/t/33727

## Jed Brown, 2013-05-05 04:48

Subject: git describe not showing "nearest" tag
Message-ID: <877gjeav64.fsf@mcs.anl.gov>
URL: https://gitlist.dev/e/877gjeav64.fsf%40mcs.anl.gov

```
$ 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, 2013-05-05 06:42

Subject: Re: git describe not showing "nearest" tag
Message-ID: <7vmwsaudv9.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vmwsaudv9.fsf%40alter.siamese.dyndns.org
In-Reply-To: <877gjeav64.fsf@mcs.anl.gov>

```
Jed Brown <jed@59A2.org> writes:

> $ 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, 2013-05-05 09:50

Subject: Re: git describe not showing "nearest" tag
Message-ID: <87y5btah7o.fsf@mcs.anl.gov>
URL: https://gitlist.dev/e/87y5btah7o.fsf%40mcs.anl.gov
In-Reply-To: <7vmwsaudv9.fsf@alter.siamese.dyndns.org>

```
Junio C Hamano <gitster@pobox.com> writes:

> 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.

```
