Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-02 12:10:23 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-02 12:10:23 +0300
commit4b9ace6c1fead1b44f173eaee0cfaa58f46a258a (patch)
treea411c934419690755623a57ff7ea5f47050050e2 /app/models/snippet.rb
parent03a521732276f8abc4ba069dd985b22cd9bc5929 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r--app/models/snippet.rb4
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.
#