Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.1 on 2022-01-26 at 16:00 UTC+1 (a few minutes of down time)

Commit e2862f5e authored by Kim "BKC" Carlbäcker's avatar Kim "BKC" Carlbäcker
Browse files

Move rugged-call from Project#write_repository_config to Git::Repository#write_config

parent 870b8cf02b69
......@@ -1437,7 +1437,7 @@ def write_repository_config(gl_full_path: full_path)
# We'd need to keep track of project full path otherwise directory tree
# created with hashed storage enabled cannot be usefully imported using
# the import rake task.
repository.rugged.config['gitlab.fullpath'] = gl_full_path
repository.raw_repository.write_config(full_path: gl_full_path)
rescue Gitlab::Git::Repository::NoRepository => e
Rails.logger.error("Error writing to .git/config for project #{full_path} (#{id}): #{e.message}.")
nil
......
......@@ -1317,6 +1317,10 @@ def multi_action(
end
# rubocop:enable Metrics/ParameterLists
def write_config(full_path: nil)
rugged.config['gitlab.fullpath'] = full_path
end
def gitaly_repository
Gitlab::GitalyClient::Util.repository(@storage, @relative_path, @gl_repository)
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment