Skip to content
Snippets Groups Projects
Commit c328a7db authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Handle exceptions when writing to .git/config

parent 582678b5
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -1440,6 +1440,9 @@ class Project < ActiveRecord::Base
def write_repository_config(key, value, prefix: :gitlab)
key = [prefix, key].compact.join('.')
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}.")
nil
end
 
def rename_repo_notify!
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment