summaryrefslogtreecommitdiff
path: root/lib/gitlab_shell.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab_shell.rb')
-rw-r--r--lib/gitlab_shell.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
index 262f9f7..e3025ef 100644
--- a/lib/gitlab_shell.rb
+++ b/lib/gitlab_shell.rb
@@ -17,7 +17,7 @@ class GitlabShell
API_COMMANDS = %w(2fa_recovery_codes)
GL_PROTOCOL = 'ssh'.freeze
- attr_accessor :key_id, :gl_repository, :repo_name, :command, :git_access
+ attr_accessor :key_id, :gl_repository, :repo_name, :command, :git_access, :show_all_refs
attr_reader :repo_path
def initialize(key_id)
@@ -100,6 +100,7 @@ class GitlabShell
self.repo_path = status.repository_path
@gl_repository = status.gl_repository
@gitaly = status.gitaly
+ @show_all_refs = status.geo_node
end
def process_cmd(args)
@@ -159,6 +160,10 @@ class GitlabShell
env['GITALY_TOKEN'] = @gitaly['token']
end
+ # We have to use a negative transfer.hideRefs since this is the only way
+ # to undo an already set parameter: https://www.spinics.net/lists/git/msg256772.html
+ env['GIT_CONFIG_PARAMETERS'] = "'transfer.hideRefs=!refs'" if @show_all_refs
+
if git_trace_available?
env.merge!({
'GIT_TRACE' => @config.git_trace_log_file,