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
+2 -1
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)