Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort tag listing by alphanumeric values #17316

Closed
camlafit opened this issue Oct 15, 2021 · 4 comments · Fixed by #21136
Closed

Sort tag listing by alphanumeric values #17316

camlafit opened this issue Oct 15, 2021 · 4 comments · Fixed by #21136

Comments

@camlafit
Copy link
Contributor

Gitea Version

1.14.1

Operating System

linux

Browser Version

not relevant

Can you reproduce the bug on the Gitea demo site?

Yes

Description

For example on https://try.gitea.io/camlafit/ps_checkout# if we list tags on interface, listing doesn't follow semver list.
2.15.x is after 2.1.x but before 2.2.x but 15 > 2.

Thanks a lot

Screenshots

Capture d’écran de 2021-10-15 16-44-37

@camlafit
Copy link
Contributor Author

could be in part related to #5709

@silverwind
Copy link
Member

silverwind commented Oct 16, 2021

Probably won't help in case of go-git, but with regular git, the expected tag sorting order can be configured in git via argument --sort=version:refname since 2.0.0, see https://stackoverflow.com/a/22634649.

@camlafit
Copy link
Contributor Author

camlafit commented Oct 16, 2021

Hello

Yes locally I use this behavior but is not complete.
For example version with label as x.y.z-alpha, it's sorted after x.y.z and not before as defined by semver logic.

@silverwind
Copy link
Member

Yeah, I meant our code could probably do the same, at least in the git binary code path.

@6543 6543 closed this as completed in e07d089 Sep 14, 2022
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants