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 3361cee733b..102fe60f2cb 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -89,9 +89,9 @@ module Gitlab
def root_ref
gitaly_ref_client.default_branch_name
rescue GRPC::NotFound => e
- raise NoRepository.new(e.message)
+ raise NoRepository, e.message
rescue GRPC::Unknown => e
- raise Gitlab::Git::CommandError.new(e.message)
+ raise Gitlab::Git::CommandError, e.message
end
def exists?
@@ -348,7 +348,7 @@ module Gitlab
limit = options[:limit]
if limit == 0 || !limit.is_a?(Integer)
- raise ArgumentError.new("invalid Repository#log limit: #{limit.inspect}")
+ raise ArgumentError, "invalid Repository#log limit: #{limit.inspect}"
end
wrapped_gitaly_errors do
@@ -414,7 +414,7 @@ module Gitlab
end
end
rescue ArgumentError => e
- raise Gitlab::Git::Repository::GitError.new(e)
+ raise Gitlab::Git::Repository::GitError, e
end
# Returns the SHA of the most recent common ancestor of +from+ and +to+
@@ -700,11 +700,11 @@ module Gitlab
end
end
- def find_remote_root_ref(remote_name)
- return unless remote_name.present?
+ def find_remote_root_ref(remote_name, remote_url, authorization = nil)
+ return unless remote_name.present? && remote_url.present?
wrapped_gitaly_errors do
- gitaly_remote_client.find_remote_root_ref(remote_name)
+ gitaly_remote_client.find_remote_root_ref(remote_name, remote_url, authorization)
end
end
@@ -836,7 +836,7 @@ module Gitlab
def fsck
msg, status = gitaly_repository_client.fsck
- raise GitError.new("Could not fsck repository: #{msg}") unless status == 0
+ raise GitError, "Could not fsck repository: #{msg}" unless status == 0
end
def create_from_bundle(bundle_path)