diff options
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index dc370b46bda..2e1a2e8e2b2 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -213,7 +213,8 @@ class Snippet < ApplicationRecord def blobs return [] unless repository_exists? - repository.ls_files(default_branch).map { |file| Blob.lazy(repository, default_branch, file) } + branch = default_branch + list_files(branch).map { |file| Blob.lazy(repository, branch, file) } end def hook_attrs |