如何列出自 X 日期以来匹配模式的标签?
How to list tags matching pattern since X date?
我需要列出在 Y
日期之后创建的所有匹配模式 X
的标签。
我尝试了以下方法:
git show --quiet $(git rev-parse --tags="linux*" --since="1 month")
但这列出了我的仓库中匹配 linux*
的所有标签。
我也试过:
git show --quiet $(git rev-list --tags="linux*" --since="1 month")
这列出了自上个月以来的所有标签,但没有考虑模式。
您可以自定义 git log
:
git log --tags=linux* --since="1 month" --no-walk
来自 git-log
文档:
--no-walk ...
Only show the given commits, but do not traverse their ancestors. ...
我需要列出在 Y
日期之后创建的所有匹配模式 X
的标签。
我尝试了以下方法:
git show --quiet $(git rev-parse --tags="linux*" --since="1 month")
但这列出了我的仓库中匹配 linux*
的所有标签。
我也试过:
git show --quiet $(git rev-list --tags="linux*" --since="1 month")
这列出了自上个月以来的所有标签,但没有考虑模式。
您可以自定义 git log
:
git log --tags=linux* --since="1 month" --no-walk
来自 git-log
文档:
--no-walk ... Only show the given commits, but do not traverse their ancestors. ...