diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-03-08 18:04:00 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-03-08 18:19:40 +0100 |
commit | 590e1b4b21f2a39bf573800392b04859b563f3e5 (patch) | |
tree | 0f33085b2380828e760023c0dec5abb19130f977 /app/models/repository.rb | |
parent | 4ec035b48869d8364f6ae8cb14c8486075786757 (diff) | |
download | gitlab-ce-590e1b4b21f2a39bf573800392b04859b563f3e5.tar.gz |
Call after_create_branch in Repository#add_branchbranch-tag-count-methods
This ensures the right caches are flushed when adding a branch via the
UI, instead of only flushing this one random cache.
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index c0730b34316..6441cd87e87 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -133,7 +133,7 @@ class Repository rugged.branches.create(branch_name, target) end - expire_branches_cache + after_create_branch find_branch(branch_name) end @@ -356,6 +356,7 @@ class Repository # Runs code after a new branch has been created. def after_create_branch + expire_branches_cache expire_has_visible_content_cache expire_branch_count_cache end |