Reputation: 998
For example when I go to OpenSSL repository, the five newest tags are (in order from oldest to newest):
However when I list them using git tag --sort=taggerdate
, I get this result:
and with git tag --sort=committerdate
:
Note that I am using just the 5 newest tags as an example, there are more of them.
Also I would like to mention that the GitHub API returns them in alphabetical order.
Upvotes: 2
Views: 2222
Reputation: 9866
I am gonna to extend the tags a little bit to six tags, since I think Github is using taggerdate
.
-- github tags: tag(Github date)
OpenSSL_1_0_2k (Jan 26, 8:22 AM EST)
OpenSSL_1_1_0d (Jan 26, 8:10 AM EST)
OpenSSL-fips-2_0_14 (Feb 16, 12:14 PM EST)
OpenSSL_1_1_0e (Feb 16, 6:58 AM EST)
OpenSSL_1_0_2l (May 25, 8:55 AM EDT)
OpenSSL_1_1_0f (May 25, 8:46 AM EDT)
$ git tags --sort=taggerdate
OpenSSL_1_1_0d
OpenSSL_1_0_2k
OpenSSL_1_1_0e
OpenSSL-fips-2_0_14
OpenSSL_1_1_0f
OpenSSL_1_0_2l
-- tags info for above tags (cmd: git log --tags --simplify-by-decoration --pretty="format:%ci %d")
2017-01-26 13:10:20 +0000 (tag: OpenSSL_1_1_0d)
2017-01-26 13:22:36 +0000 (tag: OpenSSL_1_0_2k)
2017-02-16 11:58:19 +0000 (tag: OpenSSL_1_1_0e)
2016-11-14 17:00:41 -0500 (tag: OpenSSL-fips-2_0_14, origin/OpenSSL-fips-2_0-stable)
2017-05-25 13:46:16 +0100 (tag: OpenSSL_1_1_0f)
2017-05-25 13:55:36 +0100 (tag: OpenSSL_1_0_2l)
As you can see the OpenSSL-fips-2_0_14
tag is on a branch OpenSSL-fips-2_0-stable
and other tags are on master
branch, which I think cause the different tag date. And between the same date, like OpenSSL_1_1_0f
and OpenSSL_1_0_2l
, OpenSSL_1_1_0d
and OpenSSL_1_0_2k
, that is probably because of some lexical order.
Here is some reference from the other Github repo, Caddy repo
-- github tags: tag(Github date)
v0.9.5 (Jan 24)
v0.10.0 (Apr 20)
v0.10.1 (May 2, 2:47 AM EDT)
v0.10.2 (May 2, 7:10 PM EDT)
v0.10.3 (May 19)
v0.10.4 (June 28)
$ git tags --sort=taggerdate
v0.9.5
v0.10.0
v0.10.1
v0.10.2
v0.10.3
v0.10.4
-- tags info for above tags
2017-01-24 08:29:01 -0700 (tag: v0.9.5)
2017-04-20 11:36:40 -0600 (tag: v0.10.0)
2017-05-01 23:50:58 -0600 (tag: v0.10.1)
2017-05-02 12:02:28 -0600 (tag: v0.10.2)
2017-05-19 08:35:32 -0600 (tag: v0.10.3)
2017-06-28 16:10:30 -0600 (tag: v0.10.4)
Upvotes: 1