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.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 2d13d3378c2..1bbbc16fe67 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -134,6 +134,10 @@ module Gitlab
wrapped_gitaly_errors do
gitaly_ref_client.find_branch(name)
end
+ rescue Gitlab::Git::AmbiguousRef
+ # Gitaly returns "reference is ambiguous" error in case when users request
+ # branch "my-branch", when another branch "my-branch/branch" exists.
+ # We handle this error here and return nil for this case.
end
def find_tag(name)