Merge pull request #210 from abathur/fix_regexp_space

This commit is contained in:
Tim Byrne 2020-12-22 11:01:51 -06:00
commit 7f23dde912
No known key found for this signature in database
GPG Key ID: 14DB4FC2465A4B12
1 changed files with 2 additions and 1 deletions

3
yadm
View File

@ -1373,7 +1373,8 @@ function is_valid_branch_name() {
# * "~", "^", ":", "\", space
# * end with a "/"
# * end with ".lock"
[[ "$1" =~ (\/\.|\.\.|[~^:\\ ]|\/$|\.lock$) ]] && return 1
pattern='(\/\.|\.\.|[~^:\\ ]|\/$|\.lock$)'
[[ "$1" =~ $pattern ]] && return 1
return 0
}