summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-12-21 23:41:37 +0000
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-12-21 23:41:37 +0000
commita26e37deb3aa4728523282435ed991d373db3753 (patch)
treead0353cdcc534a22c60b1b791b75af3fb7f9e4f0
parent06cef29a62fbab4174b669a6d5e2059f1f5d8756 (diff)
parentf5847911ca12534c18fe97b9d0c035d19cf2cfb2 (diff)
downloadgitlab-ce-a26e37deb3aa4728523282435ed991d373db3753.tar.gz
Merge branch 'sh-bump-gitaly-version-1.12.0' into 'master'
Bump Gitaly version to v1.12.0 See merge request gitlab-org/gitlab-ce!23996
-rw-r--r--GITALY_SERVER_VERSION2
-rw-r--r--lib/api/helpers.rb8
2 files changed, 6 insertions, 4 deletions
diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION
index f8e233b2733..0eed1a29efd 100644
--- a/GITALY_SERVER_VERSION
+++ b/GITALY_SERVER_VERSION
@@ -1 +1 @@
-1.9.0
+1.12.0
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index a7d67a6300e..c3eca713712 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -163,9 +163,11 @@ module API
end
def find_branch!(branch_name)
- user_project.repository.find_branch(branch_name) || not_found!('Branch')
- rescue Gitlab::Git::CommandError
- render_api_error!('The branch refname is invalid', 400)
+ if Gitlab::GitRefValidator.validate(branch_name)
+ user_project.repository.find_branch(branch_name) || not_found!('Branch')
+ else
+ render_api_error!('The branch refname is invalid', 400)
+ end
end
def find_project_label(id)