为什么 git taggerdate 是空的?

Why git taggerdate is empty?

我正在尝试排序 git tag。通过 Google 搜索,我发现很多帖子都在谈论 taggerdate,但在我的 repo 中,taggerdate 总是空的:

$ /usr/bin/git for-each-ref --format "%(refname) | %(subject)| %(taggerdate) | %(authordate)" refs/tags
refs/tags/hello | Merge branch 'featureY' into 'master'|  | Sun Jan 19 23:36:30 2020 -0800
refs/tags/v3.0 | Revert "aaaaaaa"|  | Wed Jul 3 15:09:20 2019 +0800
refs/tags/v4.0 | feat: a big enhancement|  | Wed Jul 3 15:12:49 2019 +0800
refs/tags/v5.0 | feat: hello world. Closed [RNWY-56].|  | Wed Jul 3 15:29:13 2019 +0800
refs/tags/v6.0 | feat: hello world. Closes [RNWY-56].|  | Wed Jul 3 15:29:13 2019 +0800

我的 git 版本是:

$ /usr/bin/git --version
git version 2.21.0 (Apple Git-120)

taggerdate是如何创建的?

这些是使用 git tag 而不是 git tag -a 创建的轻量级标签(带注释的标签)。轻量级标签没有 taggerdate。您可以使用 creatordate 格式从带注释的标签中提取 taggerdate 或从轻量级标签中提取 commiterdate

https://git-scm.com/docs/git-for-each-ref