1
0
Fork 0
mirror of synced 2024-06-05 16:41:10 -04:00

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

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
}