diff options
author | Hannes Rosenögger <123haynes@gmail.com> | 2016-08-12 16:29:13 +0200 |
---|---|---|
committer | Hannes Rosenögger <123haynes@gmail.com> | 2016-08-25 14:52:14 +0200 |
commit | f16eabfc3335119015302798cb270445ddc0dc89 (patch) | |
tree | 37c45616519c782e01749cb1783fd9b1819b1db9 /app/models | |
parent | 7bbb523b23638c52b3c0ba43d8f3dbef8840aad6 (diff) | |
download | gitlab-ce-f16eabfc3335119015302798cb270445ddc0dc89.tar.gz |
Display project icon from default branch
This commit makes sure that the project icon is
being read from the default branch instead of
'master'
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/project.rb | 1 | ||||
-rw-r--r-- | app/models/repository.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 8cf093be4c3..0e4fb94f8eb 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1035,6 +1035,7 @@ class Project < ActiveRecord::Base "refs/heads/#{branch}", force: true) repository.copy_gitattributes(branch) + repository.expire_avatar_cache(branch) reload_default_branch end diff --git a/app/models/repository.rb b/app/models/repository.rb index bdc3b9d1c1c..91bdafdac99 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -1065,7 +1065,7 @@ class Repository @avatar ||= cache.fetch(:avatar) do AVATAR_FILES.find do |file| - blob_at_branch('master', file) + blob_at_branch(root_ref, file) end end end |