Merge pull request #210 from abathur/fix_regexp_space
This commit is contained in:
commit
7f23dde912
1 changed files with 2 additions and 1 deletions
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 a new issue