summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-10-23 23:10:54 +0200
committerCiro Santilli <ciro.santilli@gmail.com>2014-10-23 23:10:54 +0200
commit9be12dd9ca171a4665e0efe4d26d44366302fc43 (patch)
treee08c3f656f0280ce43339861f83c07d7572d3c78 /lib/tasks
parent47064ea55cf82ee4e38b616348243a53fae12ce2 (diff)
downloadgitlab-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.rake3
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