diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2017-12-06 16:26:39 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-12-06 16:26:39 +0000 |
commit | 019d491ddfcdc7782335967864a72b360abc1c55 (patch) | |
tree | 4d406a1da421e52c56bd78028634bfdbd8d667d0 | |
parent | 7e81de5ba8fa2aaa13c6035c0e333b4b0ff0df9b (diff) | |
download | gitlab-shell-019d491ddfcdc7782335967864a72b360abc1c55.tar.gz |
Use 'git clone --no-local' when creating a fork
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | lib/gitlab_projects.rb | 4 |
3 files changed, 6 insertions, 3 deletions
@@ -1,3 +1,6 @@ +v5.10.1 + - Use 'git clone --no-local' when creating a fork (!176) + v5.10.0 - Add a 'fork-repository' command that works with hashed storage (!174) @@ -1 +1 @@ -5.10.0 +5.10.1 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 |