1
0
mirror of https://github.com/TheLocehiliosan/yadm synced 2026-03-02 03:49:29 +00:00

Merge pull request #210 from abathur/fix_regexp_space

This commit is contained in:
Tim Byrne
2020-12-22 11:01:51 -06:00

3
yadm
View File

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