diff --git a/captain/git.go b/captain/git.go index bedc8af..8f22fd7 100644 --- a/captain/git.go +++ b/captain/git.go @@ -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