Skip to content

Commit 22bc1db

Browse files
committed
Sort tags by commit date instead of name
1 parent d9dad83 commit 22bc1db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

setuptools_git_versioning.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ def get_branch(): # type: () -> Optional[str]
3737

3838

3939
def get_all_tags(): # type: () -> List[str]
40-
tags = _exec("git tag --sort=-version:refname")
40+
tags = _exec("git tag --sort=-committerdate")
4141
if tags:
4242
return tags
4343
return []
4444

4545

4646
def get_branch_tags(): # type: () -> List[str]
47-
tags = _exec("git tag --sort=-version:refname --merged")
47+
tags = _exec("git tag --sort=-committerdate --merged")
4848
if tags:
4949
return tags
5050
return []

0 commit comments

Comments
 (0)