diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-02 00:09:45 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-02 00:09:45 +0000 |
commit | f3506a4deee10c8b0e3c57ed2019d1df9c521258 (patch) | |
tree | fe38c632989337224685a87952446c472f05d937 /app/models/repository.rb | |
parent | 1f96548c39f3f9b03d1b2156e7cb707e748193d8 (diff) | |
download | gitlab-ce-f3506a4deee10c8b0e3c57ed2019d1df9c521258.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index d4fd202b966..d6b973d9e48 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -513,6 +513,9 @@ class Repository # Don't attempt to return a special result if there is no blob at all return unless blob + # Don't attempt to return a special result if this can't be a README + return blob unless Gitlab::FileDetector.type_of(blob.name) == :readme + # Don't attempt to return a special result unless we're looking at HEAD return blob unless head_commit&.sha == sha |