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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user