Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.0k views
in Technique[技术] by (71.8m points)

git tag --sort=taggerdate 和gitlab中显示的不一样

想获取最新的tag,但是发现gitlab中tag排序和命令行中获取的结果不一样,这是为什么呢:
在gitlab创建几个测试的tag:
image.png

在命令行中获取tag:
[root@xxx2 dev_client-protocol]# git fetch
remote: Enumerating objects: 31, done.
remote: Counting objects: 100% (31/31), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 31 (delta 18), reused 7 (delta 3), pack-reused 0
Unpacking objects: 100% (31/31), done.
From client-protocol

..61a15b8  dev          -> origin/dev
..267a1b1  dev-更新json -> origin/dev-更新json
  • [new tag] dev_1.0.1.1 -> dev_1.0.1.1
  • [new tag] dev_1.0.2.1 -> dev_1.0.2.1
  • [new tag] dev_1.1.0.1 -> dev_1.1.0.1
  • [new tag] dev_1.2.0.1 -> dev_1.2.0.1
  • ...

在命令行中查看:
[root@xxx2 dev_client-protocol]# git tag -l "dev*" --sort=taggerdate
dev_0.0.0.10
dev_0.0.0.5
dev_0.0.0.8
dev_0.0.0.9
dev_1.0.1.1
dev_1.0.2.1
dev_1.0.3.1
dev_1.0.4.1
dev_1.0.5.1
dev_1.0.6.1
dev_1.1.0.1
dev_1.2.0.1
dev_0.0.0.1
dev_0.0.0.2
命令行中获取的顺序是不对的,明显和创建tag时间不符,这是为什么呀


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

creatordate 排序试下。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...