mirror of
https://github.com/TheLocehiliosan/yadm
synced 2024-10-27 20:34:27 +00:00
Merge pull request #210 from abathur/fix_regexp_space
This commit is contained in:
commit
7f23dde912
3
yadm
3
yadm
@ -1373,7 +1373,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