diff options
author | Ciro Santilli <ciro.santilli@gmail.com> | 2014-10-23 23:10:54 +0200 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@gmail.com> | 2014-10-23 23:10:54 +0200 |
commit | 9be12dd9ca171a4665e0efe4d26d44366302fc43 (patch) | |
tree | e08c3f656f0280ce43339861f83c07d7572d3c78 /lib/tasks | |
parent | 47064ea55cf82ee4e38b616348243a53fae12ce2 (diff) | |
download | gitlab-ce-9be12dd9ca171a4665e0efe4d26d44366302fc43.tar.gz |
Merge File basename and direname into split
Faster because only does one split in that case.
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/gitlab/import.rake | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/tasks/gitlab/import.rake b/lib/tasks/gitlab/import.rake index b6ed874e11a..296ad181963 100644 --- a/lib/tasks/gitlab/import.rake +++ b/lib/tasks/gitlab/import.rake @@ -22,8 +22,7 @@ namespace :gitlab do repo_path[0..git_base_path.length] = '' path = repo_path.sub(/\.git$/, '') - name = File.basename path - group_name = File.dirname path + group_name, name = File.split(path) group_name = nil if group_name == '.' # Skip if group or user |