summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-03-08 18:01:16 +0100
committerYorick Peterse <yorickpeterse@gmail.com>2016-03-08 18:19:40 +0100
commit4ec035b48869d8364f6ae8cb14c8486075786757 (patch)
treeaa0bced5fc80225336ce9a679c8dd75e3407f1c8 /app
parent6857b92fabe511c4ed32310ad0f6bf43c534ffab (diff)
downloadgitlab-ce-4ec035b48869d8364f6ae8cb14c8486075786757.tar.gz
Call the right hooks in Repository#add_tag
This ensures Repository#add_tag calls Repository#before_push_tag instead of just 1 random cache expiration method.
Diffstat (limited to 'app')
-rw-r--r--app/models/repository.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index c3ae461a016..c0730b34316 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -138,7 +138,7 @@ class Repository
end
def add_tag(tag_name, ref, message = nil)
- expire_tags_cache
+ before_push_tag
gitlab_shell.add_tag(path_with_namespace, tag_name, ref, message)
end
@@ -334,6 +334,7 @@ class Repository
# Runs code before pushing (= creating or removing) a tag.
def before_push_tag
expire_cache
+ expire_tags_cache
expire_tag_count_cache
end