Merge File basename and direname into split
Faster because only does one split in that case.
This commit is contained in:
parent
47064ea55c
commit
9be12dd9ca
1 changed files with 1 additions and 2 deletions
|
@ -22,8 +22,7 @@ namespace :gitlab do
|
||||||
repo_path[0..git_base_path.length] = ''
|
repo_path[0..git_base_path.length] = ''
|
||||||
|
|
||||||
path = repo_path.sub(/\.git$/, '')
|
path = repo_path.sub(/\.git$/, '')
|
||||||
name = File.basename path
|
group_name, name = File.split(path)
|
||||||
group_name = File.dirname path
|
|
||||||
group_name = nil if group_name == '.'
|
group_name = nil if group_name == '.'
|
||||||
|
|
||||||
# Skip if group or user
|
# Skip if group or user
|
||||||
|
|
Loading…
Reference in a new issue