Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-01-05 17:18:58 +0300
committerSean McGivern <sean@mcgivern.me.uk>2018-01-05 17:18:58 +0300
commit737f0ae8fdf3bdd23d02da8b7fbfd8e42ba78fdd (patch)
treeddb33b1b302a7c2ffd045a467628abd545689678 /lib/gitlab/shell.rb
parent0f33ac64428b06f194882e23f5167cb9791a7f0f (diff)
parentdcebe1494e35fcd8870b38f311c5176eab6b2a2f (diff)
Merge branch 'ban-disk-import' into 'master'
Don't use Gitlab::Shell#import_repository on local paths See merge request gitlab-org/gitlab-ce!16228
Diffstat (limited to 'lib/gitlab/shell.rb')
-rw-r--r--lib/gitlab/shell.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/shell.rb b/lib/gitlab/shell.rb
index b9cc97c9244..564047bbd34 100644
--- a/lib/gitlab/shell.rb
+++ b/lib/gitlab/shell.rb
@@ -101,6 +101,10 @@ module Gitlab
#
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/874
def import_repository(storage, name, url)
+ if 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)