Not to mention regexps, and testing.

This commit is contained in:
Jakob Borg 2016-03-10 10:49:11 +01:00
parent 64cfebc63c
commit 012423338e
1 changed files with 1 additions and 1 deletions

View File

@ -543,7 +543,7 @@ func getBranchSuffix() string {
return ""
}
validBranchRe := regexp.MustCompile(`^[a-zA-Z0-9_.-]$`)
validBranchRe := regexp.MustCompile(`^[a-zA-Z0-9_.-]+$`)
if !validBranchRe.MatchString(branch) {
// There's some odd stuff in the branch name. Better skip it.
return ""