summaryrefslogtreecommitdiff
path: root/app/services/git_push_service.rb
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-03-17 16:53:05 +0100
committerYorick Peterse <yorickpeterse@gmail.com>2016-03-17 17:02:24 +0100
commita18bf1e24ce7cf987912c8496d92d355293863dd (patch)
tree96caa072ca8b1c0b71120e8dc7b42526a117fc3d /app/services/git_push_service.rb
parentf728e4b519bc153534dc9632aa37932e2ac24801 (diff)
downloadgitlab-ce-caching-project-avatars.tar.gz
Cache project avatars stored in Gitcaching-project-avatars
The avatar logic has been moved from Project to Repository as this makes caching easier. The logic itself in turn has been changed so that the logo file names are cached in Redis. This cache is flushed upon pushing a commit but _only_ if: 1. The commit was pushed to the default branch 2. The commit actually changes any of the logo files If no branch or commit is given the cache is flushed anyway, this ensures that calling Repository#expire_cache without any arguments still flushes the avatar cache (e.g. this is used when removing a project). Fixes gitlab-org/gitlab-ce#14363
Diffstat (limited to 'app/services/git_push_service.rb')
-rw-r--r--app/services/git_push_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb
index d840ab5e340..14e2a2c0699 100644
--- a/app/services/git_push_service.rb
+++ b/app/services/git_push_service.rb
@@ -17,7 +17,7 @@ class GitPushService < BaseService
# 6. Checks if the project's main language has changed
#
def execute
- @project.repository.after_push_commit(branch_name)
+ @project.repository.after_push_commit(branch_name, params[:newrev])
if push_remove_branch?
@project.repository.after_remove_branch