summaryrefslogtreecommitdiff
path: root/app/models/repository.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-10 18:12:35 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-10 18:12:35 +0000
commit6fd750c19206412cfc52b49a70b56147d839c52f (patch)
tree04607e6c9864c09dd312d6bfc3efe9cc5f81c762 /app/models/repository.rb
parent26881dd926cfac47c9603d44e8d5a504ab8c4a14 (diff)
downloadgitlab-ce-6fd750c19206412cfc52b49a70b56147d839c52f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r--app/models/repository.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 7b24ae35125..c7054b89255 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -1091,6 +1091,13 @@ class Repository
after_create
true
+ rescue Gitlab::Git::Repository::RepositoryExists
+ # We do not want to call `#after_create` given that we didn't create the
+ # repo, but we obviously have a mismatch between what's in our exists cache
+ # and actual on-disk state as seen by Gitaly. Let's thus expire our caches.
+ expire_status_cache
+
+ nil
end
def create_from_bundle(bundle_path)