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:
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-rw-r--r--lib/gitlab/git/repository.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 80d0fd17568..ed45d3eb030 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -91,12 +91,10 @@ module Gitlab
end
# Default branch in the repository
- def root_ref
- gitaly_ref_client.default_branch_name
- rescue GRPC::NotFound => e
- raise NoRepository, e.message
- rescue GRPC::Unknown => e
- raise Gitlab::Git::CommandError, e.message
+ def root_ref(head_only: false)
+ wrapped_gitaly_errors do
+ gitaly_ref_client.default_branch_name(head_only: head_only)
+ end
end
def exists?
@@ -520,13 +518,15 @@ module Gitlab
empty_diff_stats
end
- def find_changed_paths(commits)
+ def find_changed_paths(commits, merge_commit_diff_mode: nil)
processed_commits = commits.reject { |ref| ref.blank? || Gitlab::Git.blank_ref?(ref) }
return [] if processed_commits.empty?
wrapped_gitaly_errors do
- gitaly_commit_client.find_changed_paths(processed_commits)
+ gitaly_commit_client.find_changed_paths(
+ processed_commits, merge_commit_diff_mode: merge_commit_diff_mode
+ )
end
rescue CommandError, TypeError, NoRepository
[]