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
path: root/lib
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2018-09-08 12:44:55 +0300
committerRobert Schilling <rschilling@student.tugraz.at>2018-09-08 12:44:55 +0300
commit4e39fc1a407de8cb946cd70f789eacd149d6653b (patch)
tree85086f631b65936058bf637a645f15ec8587f611 /lib
parenta14e9cfde83c708791ba6a66b45addbe719c9a1d (diff)
Fix rubocop
Diffstat (limited to 'lib')
-rw-r--r--lib/api/helpers.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 3469fffc1c8..5505d7a7b08 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -157,11 +157,9 @@ module API
end
def find_branch!(branch_name)
- begin
- user_project.repository.find_branch(branch_name) || not_found!('Branch')
- rescue Gitlab::Git::CommandError
- render_api_error!('The branch refname is invalid', 400)
- end
+ user_project.repository.find_branch(branch_name) || not_found!('Branch')
+ rescue Gitlab::Git::CommandError
+ render_api_error!('The branch refname is invalid', 400)
end
def find_project_label(id)