diff options
author | Stan Hu <stanhu@gmail.com> | 2016-04-28 16:48:37 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-05-04 11:59:12 -0700 |
commit | 525e05b6536123a3117b5ff53fd46a96382d5f9d (patch) | |
tree | 1d7c7e53aa49f1e387427f5ef68522c028c41046 | |
parent | 585f5cfa3359496733b5bd344ae89f98b5578865 (diff) | |
download | gitlab-ce-525e05b6536123a3117b5ff53fd46a96382d5f9d.tar.gz |
Expire repository exists? and has_visible_content? caches after a push if necessary
Closes #17012
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/services/git_push_service.rb | 1 | ||||
-rw-r--r-- | app/services/git_tag_push_service.rb | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG index 25d26535b72..925740e5d98 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -20,6 +20,7 @@ v 8.8.0 (unreleased) - Improve description for the Two-factor Authentication sign-in screen. (Connor Shea) - API support for the 'since' and 'until' operators on commit requests (Paco Guzman) - Fix Gravatar hint in user profile when Gravatar is disabled. !3988 (Artem Sidorenko) + - Expire repository exists? and has_visible_content? caches after a push if necessary v 8.7.3 - Emails, Gitlab::Email::Message, Gitlab::Diff, and Premailer::Adapter::Nokogiri are now instrumented diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb index b7af80055bf..66136b62617 100644 --- a/app/services/git_push_service.rb +++ b/app/services/git_push_service.rb @@ -17,6 +17,7 @@ class GitPushService < BaseService # 6. Checks if the project's main language has changed # def execute + @project.repository.after_create if @project.empty_repo? @project.repository.after_push_commit(branch_name, params[:newrev]) if push_remove_branch? diff --git a/app/services/git_tag_push_service.rb b/app/services/git_tag_push_service.rb index 64271d8bc5c..7410442609d 100644 --- a/app/services/git_tag_push_service.rb +++ b/app/services/git_tag_push_service.rb @@ -2,6 +2,7 @@ class GitTagPushService < BaseService attr_accessor :push_data def execute + project.repository.after_create if project.empty_repo? project.repository.before_push_tag @push_data = build_push_data |