diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-20 13:43:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-20 13:43:29 +0300 |
commit | 3b1af5cc7ed2666ff18b718ce5d30fa5a2756674 (patch) | |
tree | 3bc4a40e0ee51ec27eabf917c537033c0c5b14d4 /app/models/repository.rb | |
parent | 9bba14be3f2c211bf79e15769cd9b77bc73a13bc (diff) |
Add latest changes from gitlab-org/gitlab@16-1-stable-eev16.1.0-rc42
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index e942157993b..b21df6baf0e 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -691,7 +691,7 @@ class Repository @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) + def tree(sha = :head, path = nil, recursive: false, skip_flat_paths: true, pagination_params: nil, ref_type: nil) if sha == :head return if empty? || root_ref.nil? @@ -699,10 +699,11 @@ class Repository return head_tree(skip_flat_paths: skip_flat_paths) else sha = head_commit.sha + ref_type = nil end end - Tree.new(self, sha, path, recursive: recursive, skip_flat_paths: skip_flat_paths, pagination_params: pagination_params) + Tree.new(self, sha, path, recursive: recursive, skip_flat_paths: skip_flat_paths, pagination_params: pagination_params, ref_type: ref_type) end def blob_at_branch(branch_name, path) @@ -880,10 +881,12 @@ class Repository end def merge(user, source_sha, merge_request, message) - merge_to_branch(user, - source_sha: source_sha, - target_branch: merge_request.target_branch, - message: message) do |commit_id| + merge_to_branch( + user, + source_sha: source_sha, + target_branch: merge_request.target_branch, + message: message + ) do |commit_id| merge_request.update_and_mark_in_progress_merge_commit_sha(commit_id) nil # Return value does not matter. end @@ -1136,10 +1139,13 @@ class Repository end def squash(user, merge_request, message) - raw.squash(user, start_sha: merge_request.diff_start_sha, - end_sha: merge_request.diff_head_sha, - author: merge_request.author, - message: message) + raw.squash( + user, + start_sha: merge_request.diff_start_sha, + end_sha: merge_request.diff_head_sha, + author: merge_request.author, + message: message + ) end def submodule_links @@ -1271,11 +1277,13 @@ class Repository end def initialize_raw_repository - Gitlab::Git::Repository.new(shard, - disk_path + '.git', - repo_type.identifier_for_container(container), - container.full_path, - container: container) + Gitlab::Git::Repository.new( + shard, + disk_path + '.git', + repo_type.identifier_for_container(container), + container.full_path, + container: container + ) end end |