If git >= 2.0, sort tags in descending order by version number

This commit is contained in:
Linquize 2014-10-04 00:25:54 +08:00
parent 1126522a99
commit 67c44b7d27
2 changed files with 16 additions and 0 deletions

View file

@ -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 {