1
0
Fork 0
mirror of synced 2025-01-30 23:04:19 -05:00

Fix regexp with space for compatibility

This commit is contained in:
Travis A. Everett 2020-04-02 22:41:08 -05:00 committed by GitHub
parent 550a6b4340
commit 9132b6dec9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

3
yadm
View file

@ -1318,7 +1318,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
}