diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2016-07-26 10:17:28 +0200 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2016-07-26 11:17:27 +0200 |
commit | 226c224234d8ac67f22fb162953e7ac905d42ad8 (patch) | |
tree | dc535c6ba9e4387afd38390433a44e3548543be0 /app/models | |
parent | 08c8b97413d9814f228efc68675a5dc079bb487b (diff) | |
download | gitlab-ce-226c224234d8ac67f22fb162953e7ac905d42ad8.tar.gz |
Rescue Rugged::OSError (lock exists) when creating references.20156-rescue-reference-create-due-to-file-lock-exists
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/repository.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index e9d5f4c91f8..d8775ecbd6c 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -211,6 +211,9 @@ class Repository rugged.references.create(keep_around_ref_name(sha), sha, force: true) rescue Rugged::ReferenceError => ex Rails.logger.error "Unable to create keep-around reference for repository #{path}: #{ex}" + rescue Rugged::OSError => ex + raise unless ex.message =~ /Failed to create locked file/ && ex.message =~ /File exists/ + Rails.logger.error "Unable to create keep-around reference for repository #{path}: #{ex}" end end |