diff options
author | Stan Hu <stanhu@gmail.com> | 2017-12-08 16:48:24 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-12-08 16:48:24 -0800 |
commit | e8cced80777d75eab98a1ce81742d860e60a6e15 (patch) | |
tree | 0e232ce7c22787697e2cafb9d06d70eb1b75e340 /lib | |
parent | 78f7c3c8a2ac9f72b54e8e76005ef8810d1a068a (diff) | |
download | gitlab-ce-e8cced80777d75eab98a1ce81742d860e60a6e15.tar.gz |
Fix failing importer test case on MySQL due to missing trailing slash in root pathsh-fix-import-rake-task
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/bare_repository_import/repository.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/bare_repository_import/repository.rb b/lib/gitlab/bare_repository_import/repository.rb index 8574ac6eb30..d3971db1c89 100644 --- a/lib/gitlab/bare_repository_import/repository.rb +++ b/lib/gitlab/bare_repository_import/repository.rb @@ -34,8 +34,11 @@ module Gitlab private def repo_relative_path + absolute_path = Pathname.new(repo_path) + project_root = Pathname.new(@root_path) + # Remove root path and `.git` at the end - repo_path[@root_path.size...-4] + absolute_path.relative_path_from(project_root).to_s.gsub(/\.git$/, '') end end end |