mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-18 16:03:07 +00:00
If git >= 2.0, sort tags in descending order by version number
This commit is contained in:
parent
1126522a99
commit
67c44b7d27
2 changed files with 16 additions and 0 deletions
|
@ -74,6 +74,10 @@ func (v *Version) LessThan(that *Version) bool {
|
|||
return v.Compare(that) < 0
|
||||
}
|
||||
|
||||
func (v *Version) AtLeast(that *Version) bool {
|
||||
return v.Compare(that) >= 0
|
||||
}
|
||||
|
||||
// GetVersion returns current Git version installed.
|
||||
func GetVersion() (*Version, error) {
|
||||
if gitVer != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue