diff options
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-rw-r--r-- | lib/gitlab/git/repository.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index d7f892ae9d9..ad655fedb6d 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -135,6 +135,13 @@ module Gitlab gitaly_ref_client.find_tag(name) end rescue CommandError + # Gitaly used to return an `Internal` error in case the tag wasn't found, which is being translated to + # `CommandError` by the wrapper. This has been converted in v15.3.0 to instead return a structured + # error with a `tag_not_found` error, so rescuing from `Internal` errors can be removed in v15.4.0 and + # later. + rescue Gitlab::Git::UnknownRef + # This is the new error returned by `find_tag`, which knows to translate the structured error returned + # by Gitaly when the tag does not exist. end def local_branches(sort_by: nil, pagination_params: nil) @@ -910,7 +917,7 @@ module Gitlab def multi_action( user, branch_name:, message:, actions:, author_email: nil, author_name: nil, - start_branch_name: nil, start_sha: nil, start_repository: self, + start_branch_name: nil, start_sha: nil, start_repository: nil, force: false) wrapped_gitaly_errors do @@ -930,6 +937,12 @@ module Gitlab gitaly_repository_client.set_full_path(full_path) end + def full_path + wrapped_gitaly_errors do + gitaly_repository_client.full_path + end + end + def disconnect_alternates wrapped_gitaly_errors do gitaly_repository_client.disconnect_alternates |