diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2018-01-04 18:34:37 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2018-01-04 18:34:37 +0300 |
commit | 44d15e414348ab7befaa22636b85d1c0d9064d08 (patch) | |
tree | 0dcaff48d62df6272e91355ebdf7643bb48f214a /lib/gitlab/shell.rb | |
parent | 1e950e3148d31cb3b242cb21be11e04964c2a037 (diff) |
get it working
Diffstat (limited to 'lib/gitlab/shell.rb')
-rw-r--r-- | lib/gitlab/shell.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/shell.rb b/lib/gitlab/shell.rb index 9cdd3d22f18..1d0eae28f82 100644 --- a/lib/gitlab/shell.rb +++ b/lib/gitlab/shell.rb @@ -102,6 +102,10 @@ module Gitlab # # Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/387 def import_repository(storage, name, url) + if url.start_with?('.') || url.start_with?('/') + raise Error.new("don't use disk paths with import_repository: #{url.inspect}") + end + # The timeout ensures the subprocess won't hang forever cmd = gitlab_projects(storage, "#{name}.git") success = cmd.import_project(url, git_timeout) |