summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-12-05 16:03:58 +0100
committerJacob Vosmaer <jacob@gitlab.com>2017-12-05 16:03:58 +0100
commitc27e7dfd5c4e62e3d57293cef25c29892d1e1f20 (patch)
treefdf57fd16bff19aa8528ff549c149c9bbf42f8c1
parent7e81de5ba8fa2aaa13c6035c0e333b4b0ff0df9b (diff)
downloadgitlab-shell-c27e7dfd5c4e62e3d57293cef25c29892d1e1f20.tar.gz
Use --no-local when cloning a fork
-rw-r--r--lib/gitlab_projects.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab_projects.rb b/lib/gitlab_projects.rb
index ad62cce..b616fd0 100644
--- a/lib/gitlab_projects.rb
+++ b/lib/gitlab_projects.rb
@@ -257,7 +257,7 @@ class GitlabProjects
# timeout for clone
timeout = (ARGV.shift || 120).to_i
$logger.info "Importing project #{@project_name} from <#{masked_source}> to <#{full_path}>."
- cmd = %W(git clone --bare -- #{@source} #{full_path})
+ cmd = p %W(git clone --bare -- #{@source} #{full_path})
pid = Process.spawn(*cmd)
@@ -385,7 +385,7 @@ class GitlabProjects
FileUtils.mkdir_p(File.dirname(to_path), mode: 0770)
$logger.info "Forking repository from <#{from_path}> to <#{to_path}>."
- cmd = %W(git clone --bare -- #{from_path} #{to_path})
+ cmd = %W(git clone --bare --no-local -- #{from_path} #{to_path})
system(*cmd) && self.class.create_hooks(to_path)
end
@@ -422,7 +422,7 @@ class GitlabProjects
end
$logger.info "Forking project from <#{full_path}> to <#{full_destination_path}>."
- cmd = %W(git clone --bare -- #{full_path} #{full_destination_path})
+ cmd = %W(git clone --bare --no-local -- #{full_path} #{full_destination_path})
system(*cmd) && self.class.create_hooks(full_destination_path)
end