Skip to content

Commit

Permalink
#13 fix tag list is empty use-case
Browse files Browse the repository at this point in the history
  • Loading branch information
dkapanidis committed Jul 8, 2015
1 parent 2b1d497 commit 6eaa088
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion captain/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func getRevision() string {
func getBranch() string {
branch,_ := oneliner("git", "name-rev", "--name-only", "HEAD")
tag,err := oneliner("git", "tag", "--points-at", "HEAD")
if (err ==nil) {
if (err ==nil && tag != "") {
branch = tag
}
// Remove start of "heads/origin" if exist
Expand Down

0 comments on commit 6eaa088

Please sign in to comment.