git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Daniel Drake <drake@endlessm.com>
To: git@vger.kernel.org
Subject: Strange commit count shown by "git describe"
Date: Mon, 27 Aug 2018 11:15:37 +0800	[thread overview]
Message-ID: <CAD8Lp45mBWtxsXBVgKuDmhP1rUzVkLJRTff=v1NKjMHZR5g87A@mail.gmail.com> (raw)

Hi,

Using git 2.17.1 in Ubuntu 18.04 I'm seeing some strange behaviour
when using "git describe" with the repo at
http://github.com/endlessm/linux

First to rewind to a recent commit on the eos3.4 branch and observe:
$ git reset --hard 282b7f72f11f5617947df941a247b0a286faac35

$ git describe
Version_4.15.0-32.35-724859-g282b7f72f11f
$ git describe --match 'Version_*'
Version_4.15.0-32.35-185-g282b7f72f11f

Why is the commit count vastly different when I specify a glob to
match the same (annotated) tag? 724859 vs 185.

185 is what I would have expected.. at least this shows 182 commits:
$ git rev-list Version_4.15.0-32.35..HEAD

Same again with --debug output:

$ git describe --debug
describe HEAD
No exact match on refs or tags, searching to describe
 annotated     724859 Version_4.15.0-32.35
 annotated        117 Version_4.15.0-30.32
 annotated        124 Ubuntu-4.15.0-29.31
 annotated        142 Ubuntu-4.15.0-28.30
 annotated        146 Ubuntu-4.15.0-27.29
 annotated        149 Ubuntu-4.15.0-26.28
 annotated        152 Ubuntu-4.15.0-25.27
 annotated        167 Ubuntu-4.15.0-24.26
 annotated        919 Release_3.4.6
 annotated        926 Release_3.4.4
traversed 728431 commits
more than 10 tags found; listed 10 most recent
gave up search at f30048d13c9ea1763af8c8e448d9e91de116c114
Version_4.15.0-32.35-724859-g282b7f72f11f

$ git describe --debug --match 'Version_*'
describe HEAD
No exact match on refs or tags, searching to describe
finished search at 2261ba7c40893b3659d8b48a77745bfe79e66526
 annotated        185 Version_4.15.0-32.35
 annotated        289 Version_4.15.0-30.32
 annotated       1100 Version_4.15.0-23.25
 annotated       1234 Version_4.15.0-22.24
 annotated       1274 Version_4.15.0-20.21
 annotated       1813 Version_4.15.0-15.16
 annotated       2949 Version_4.15.0-12.13
 annotated       3564 Version_4.15.0-10.11
 annotated       3607 Version_4.15.0-9.10
 annotated       3754 Version_4.15.0-5.6
traversed 3757 commits
Version_4.15.0-32.35-185-g282b7f72f11f


A similar problem occurs on the current HEAD
(773a8ad2c3b6a54993bc88381b509621aac5be4f) of the eos3.4 branch.
However in that case, even with the --match arg I get a strange commit
count:

$ git describe --match 'Version_*'
Version_4.15.0-33.36-724860-g773a8ad2c3b6

but I would have expected to see a commit count of ~183:
$ git rev-list Version_4.15.0-33.36..HEAD | wc -l
183


Daniel

                 reply	other threads:[~2018-08-27  3:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAD8Lp45mBWtxsXBVgKuDmhP1rUzVkLJRTff=v1NKjMHZR5g87A@mail.gmail.com' \
    --to=drake@endlessm.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).