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

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-11-15 00:29:04 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-11-15 00:29:04 +0300
commit6f07f5dfaae137a9bb62c4f5dd2136a6e3fcf93f (patch)
tree000368d3dde3a9f175ce04a07fb57662d914065b
parent7f0047b8f9af148ca3b15a8c3e8cc44ae159991d (diff)
Unhide all refs when fetching internal remoteda-unhide-all-refs-when-fetching-internal-remote
-rw-r--r--ruby/lib/gitaly_server/remote_service.rb2
-rw-r--r--ruby/lib/gitlab/git/repository.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/ruby/lib/gitaly_server/remote_service.rb b/ruby/lib/gitaly_server/remote_service.rb
index 39cc6e60e..dda0c7dcb 100644
--- a/ruby/lib/gitaly_server/remote_service.rb
+++ b/ruby/lib/gitaly_server/remote_service.rb
@@ -16,7 +16,7 @@ module GitalyServer
repo = Gitlab::Git::Repository.from_gitaly(request.repository, call)
remote_repo = Gitlab::Git::GitalyRemoteRepository.new(request.remote_repository, call)
- result = repo.fetch_repository_as_mirror(remote_repo)
+ result = repo.fetch_repository_as_mirror(remote_repo, git_config_options: ["'transfer.hideRefs=!refs'"])
Gitaly::FetchInternalRemoteResponse.new(result: result)
end
diff --git a/ruby/lib/gitlab/git/repository.rb b/ruby/lib/gitlab/git/repository.rb
index e269ea72c..295e2a142 100644
--- a/ruby/lib/gitlab/git/repository.rb
+++ b/ruby/lib/gitlab/git/repository.rb
@@ -685,12 +685,12 @@ module Gitlab
Gitlab::Git::Blob.find(self, sha, path) unless Gitlab::Git.blank_ref?(sha)
end
- def fetch_repository_as_mirror(repository)
+ def fetch_repository_as_mirror(repository, git_config_options: [])
remote_name = "tmp-#{SecureRandom.hex}"
repository = RemoteRepository.new(repository) unless repository.is_a?(RemoteRepository)
add_remote(remote_name, GITALY_INTERNAL_URL, mirror_refmap: :all_refs)
- fetch_remote(remote_name, env: repository.fetch_env)
+ fetch_remote(remote_name, env: repository.fetch_env(git_config_options: git_config_options))
ensure
remove_remote(remote_name)
end