diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-18 21:09:57 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-18 21:09:57 +0000 |
commit | bfce95a4c5e9d71ed523f48f3fb901d2b7af60f7 (patch) | |
tree | 6bada22ff3863edec03f928f8edcf19c6e7107f1 /app/models/repository.rb | |
parent | 85f7fa54f404f28b0f351c2be0f7a6e9d74fe65f (diff) | |
download | gitlab-ce-bfce95a4c5e9d71ed523f48f3fb901d2b7af60f7.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 9d876321217..0b82c5f943e 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -220,6 +220,7 @@ class Repository prefix_regex.match?(ref) end end + cache_method :has_ambiguous_refs? def expand_ref(ref) if tag_exists?(ref) @@ -311,12 +312,12 @@ class Repository end def expire_tags_cache - expire_method_caches(%i(tag_names tag_count)) + expire_method_caches(%i(tag_names tag_count has_ambiguous_refs?)) @tags = nil end def expire_branches_cache - expire_method_caches(%i(branch_names merged_branch_names branch_count has_visible_content?)) + expire_method_caches(%i(branch_names merged_branch_names branch_count has_visible_content? has_ambiguous_refs?)) @local_branches = nil @branch_exists_memo = nil end |