mirror of
https://github.com/TheLocehiliosan/yadm
synced 2024-10-27 20:34:27 +00:00
Fix regexp with space for compatibility
This commit is contained in:
parent
550a6b4340
commit
9132b6dec9
3
yadm
3
yadm
@ -1318,7 +1318,8 @@ function is_valid_branch_name() {
|
|||||||
# * "~", "^", ":", "\", space
|
# * "~", "^", ":", "\", space
|
||||||
# * end with a "/"
|
# * end with a "/"
|
||||||
# * end with ".lock"
|
# * end with ".lock"
|
||||||
[[ "$1" =~ (\/\.|\.\.|[~^:\\ ]|\/$|\.lock$) ]] && return 1
|
pattern='(\/\.|\.\.|[~^:\\ ]|\/$|\.lock$)'
|
||||||
|
[[ "$1" =~ $pattern ]] && return 1
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user