1
0
mirror of https://github.com/go-gitea/git.git synced 2026-02-05 15:45:40 +01:00

Merge pull request #9 from moltam/fix/empty-tag-list

Fixed returning non empty tag list when there are no tags.
This commit is contained in:
Unknwon
2016-03-23 15:36:23 -04:00

View File

@@ -103,7 +103,8 @@ func (repo *Repository) GetTags() ([]string, error) {
return nil, err
}
tags := strings.Split(strings.TrimSpace(stdout), "\n")
tags := strings.Split(stdout, "\n")
tags = tags[:len(tags)-1]
if version.Compare(gitVersion, "2.0.0", "<") {
version.Sort(tags)