{"thread":{"id":"49223","subject":"Strange commit count shown by \"git describe\"","startedAt":"2018-08-27T03:15:41Z","lastAt":"2018-08-27T03:15:41Z","messageCount":1,"participants":["Daniel Drake"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"356568","messageId":"CAD8Lp45mBWtxsXBVgKuDmhP1rUzVkLJRTff=v1NKjMHZR5g87A@mail.gmail.com","threadId":"49223","inReplyTo":null,"subject":"Strange commit count shown by \"git describe\"","fromName":"Daniel Drake","fromEmail":"drake@endlessm.com","sentAt":"2018-08-27T03:15:37Z","receivedAt":"2018-08-27T03:15:41Z","isPatch":false,"sender":{"key":"drake@endlessm.com","avatar":null},"body":"Hi,\n\nUsing git 2.17.1 in Ubuntu 18.04 I'm seeing some strange behaviour\nwhen using \"git describe\" with the repo at\nhttp://github.com/endlessm/linux\n\nFirst to rewind to a recent commit on the eos3.4 branch and observe:\n$ git reset --hard 282b7f72f11f5617947df941a247b0a286faac35\n\n$ git describe\nVersion_4.15.0-32.35-724859-g282b7f72f11f\n$ git describe --match 'Version_*'\nVersion_4.15.0-32.35-185-g282b7f72f11f\n\nWhy is the commit count vastly different when I specify a glob to\nmatch the same (annotated) tag? 724859 vs 185.\n\n185 is what I would have expected.. at least this shows 182 commits:\n$ git rev-list Version_4.15.0-32.35..HEAD\n\nSame again with --debug output:\n\n$ git describe --debug\ndescribe HEAD\nNo exact match on refs or tags, searching to describe\n annotated     724859 Version_4.15.0-32.35\n annotated        117 Version_4.15.0-30.32\n annotated        124 Ubuntu-4.15.0-29.31\n annotated        142 Ubuntu-4.15.0-28.30\n annotated        146 Ubuntu-4.15.0-27.29\n annotated        149 Ubuntu-4.15.0-26.28\n annotated        152 Ubuntu-4.15.0-25.27\n annotated        167 Ubuntu-4.15.0-24.26\n annotated        919 Release_3.4.6\n annotated        926 Release_3.4.4\ntraversed 728431 commits\nmore than 10 tags found; listed 10 most recent\ngave up search at f30048d13c9ea1763af8c8e448d9e91de116c114\nVersion_4.15.0-32.35-724859-g282b7f72f11f\n\n$ git describe --debug --match 'Version_*'\ndescribe HEAD\nNo exact match on refs or tags, searching to describe\nfinished search at 2261ba7c40893b3659d8b48a77745bfe79e66526\n annotated        185 Version_4.15.0-32.35\n annotated        289 Version_4.15.0-30.32\n annotated       1100 Version_4.15.0-23.25\n annotated       1234 Version_4.15.0-22.24\n annotated       1274 Version_4.15.0-20.21\n annotated       1813 Version_4.15.0-15.16\n annotated       2949 Version_4.15.0-12.13\n annotated       3564 Version_4.15.0-10.11\n annotated       3607 Version_4.15.0-9.10\n annotated       3754 Version_4.15.0-5.6\ntraversed 3757 commits\nVersion_4.15.0-32.35-185-g282b7f72f11f\n\n\nA similar problem occurs on the current HEAD\n(773a8ad2c3b6a54993bc88381b509621aac5be4f) of the eos3.4 branch.\nHowever in that case, even with the --match arg I get a strange commit\ncount:\n\n$ git describe --match 'Version_*'\nVersion_4.15.0-33.36-724860-g773a8ad2c3b6\n\nbut I would have expected to see a commit count of ~183:\n$ git rev-list Version_4.15.0-33.36..HEAD | wc -l\n183\n\n\nDaniel\n"}]}