1
0
mirror of https://github.com/TheLocehiliosan/yadm synced 2026-03-02 03:49:29 +00: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

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
}