summaryrefslogtreecommitdiff
path: root/lib/gitlab_projects.rb
diff options
context:
space:
mode:
authorJacob Vosmaer (GitLab) <jacob@gitlab.com>2017-12-06 16:26:39 +0000
committerRobert Speicher <robert@gitlab.com>2017-12-06 16:26:39 +0000
commit019d491ddfcdc7782335967864a72b360abc1c55 (patch)
tree4d406a1da421e52c56bd78028634bfdbd8d667d0 /lib/gitlab_projects.rb
parent7e81de5ba8fa2aaa13c6035c0e333b4b0ff0df9b (diff)
downloadgitlab-shell-019d491ddfcdc7782335967864a72b360abc1c55.tar.gz
Use 'git clone --no-local' when creating a fork
Diffstat (limited to 'lib/gitlab_projects.rb')
-rw-r--r--lib/gitlab_projects.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab_projects.rb b/lib/gitlab_projects.rb
index ad62cce..6700735 100644
--- a/lib/gitlab_projects.rb
+++ b/lib/gitlab_projects.rb
@@ -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