This instance will be upgraded to Heptapod 0.31.0 (final) on 2022-05-24 at 14:00 UTC+2 (a few minutes of down time)

Commit e8584548 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Handle exceptions when writing to .git/config

parent 524cf7684def
...@@ -1440,6 +1440,9 @@ def after_rename_repo ...@@ -1440,6 +1440,9 @@ def after_rename_repo
def write_repository_config(key, value, prefix: :gitlab) def write_repository_config(key, value, prefix: :gitlab)
key = [prefix, key].compact.join('.') key = [prefix, key].compact.join('.')
repo.config[key] = value repo.config[key] = value
rescue Gitlab::Git::Repository::NoRepository => e
Rails.logger.error("Error writing key #{key} to .git/config for project #{full_path} (#{id}): #{e.message}.")
end end
def rename_repo_notify! def rename_repo_notify!
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