diff options
author | Stan Hu <stanhu@gmail.com> | 2018-12-21 23:41:37 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-12-21 23:41:37 +0000 |
commit | f5847911ca12534c18fe97b9d0c035d19cf2cfb2 (patch) | |
tree | ad0353cdcc534a22c60b1b791b75af3fb7f9e4f0 | |
parent | 06cef29a62fbab4174b669a6d5e2059f1f5d8756 (diff) | |
download | gitlab-ce-f5847911ca12534c18fe97b9d0c035d19cf2cfb2.tar.gz |
Bump Gitaly version to v1.12.0
-rw-r--r-- | GITALY_SERVER_VERSION | 2 | ||||
-rw-r--r-- | lib/api/helpers.rb | 8 |
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) |