diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-06 18:08:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-06 18:08:05 +0300 |
commit | f78257cbddd711e18cbce93ad740a4aa0acac347 (patch) | |
tree | 7f018abe3ce1c0010879cc480f348a35e616fabb /app/models/snippet.rb | |
parent | f500600a43b531e2e7a5858b74bd35312b02c349 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 770d9b5205c..27e1778e9b6 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -197,6 +197,8 @@ class Snippet < ApplicationRecord end def blobs + return [] unless repository_exists? + repository.ls_files(repository.root_ref).map { |file| Blob.lazy(self, repository.root_ref, file) } end |