diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-02 12:10:23 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-02 12:10:23 +0300 |
commit | 4b9ace6c1fead1b44f173eaee0cfaa58f46a258a (patch) | |
tree | a411c934419690755623a57ff7ea5f47050050e2 /app/models/snippet.rb | |
parent | 03a521732276f8abc4ba069dd985b22cd9bc5929 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index eb3960ff12b..0179176ba9e 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -345,6 +345,10 @@ class Snippet < ApplicationRecord repository.ls_files(ref) end + def multiple_files? + list_files(repository.root_ref).size > 1 + end + class << self # Searches for snippets with a matching title, description or file name. # |