Commit a26e37de authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

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
parents 06cef29a f5847911
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment