Skip to content

Fixed returning non empty tag list when there are no tags. #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 23, 2016

Conversation

moltam
Copy link
Contributor

@moltam moltam commented Mar 23, 2016

Since #8, when a repo has no tags, then a non empty tag list is returned ([""]). Reference: gogs/gogs#2880

I made this mistake by replacing the previous implementation (tags[:len(tags)-1]) with strings.TrimSpace(stdout). This worked fine, then there were tags, but created an invalid list otherwise.

This PR fixes this.

Sorry for my mistake!

@unknwon unknwon merged commit 731b9be into gogs:master Mar 23, 2016
sapk pushed a commit to sapk-fork/git-module that referenced this pull request Mar 8, 2017
Integrated drone and other standard files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants