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>2023-02-09 00:11:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-09 00:11:09 +0300
commit3d42e098d9658853984534c9dfc2bf76284a8ac0 (patch)
tree269e9d9e017124f5f6d841311661832ea7e4eff8 /app/models
parenta3487798aeff89daff78749e6d6f392d3ca23687 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r--app/models/repository.rb14
1 files changed, 3 insertions, 11 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index f71d7bb8d20..31c65555cb2 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -696,22 +696,14 @@ class Repository
end
def head_tree(skip_flat_paths: true)
- if Feature.enabled?(:optimized_head_tree)
- return if empty? || root_ref.nil?
+ return if empty? || root_ref.nil?
- @head_tree ||= Tree.new(self, root_ref, nil, skip_flat_paths: skip_flat_paths)
- elsif head_commit
- @head_tree ||= Tree.new(self, head_commit.sha, nil, skip_flat_paths: skip_flat_paths)
- end
+ @head_tree ||= Tree.new(self, root_ref, nil, skip_flat_paths: skip_flat_paths)
end
def tree(sha = :head, path = nil, recursive: false, skip_flat_paths: true, pagination_params: nil)
if sha == :head
- if Feature.enabled?(:optimized_head_tree)
- return if empty? || root_ref.nil?
- else
- return unless head_commit
- end
+ return if empty? || root_ref.nil?
if path.nil?
return head_tree(skip_flat_paths: skip_flat_paths)