summaryrefslogtreecommitdiff
path: root/lib/gitlab/checks/branch_check.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/checks/branch_check.rb')
-rw-r--r--lib/gitlab/checks/branch_check.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/checks/branch_check.rb b/lib/gitlab/checks/branch_check.rb
index e8f13a92ee7..fa7c4972c91 100644
--- a/lib/gitlab/checks/branch_check.rb
+++ b/lib/gitlab/checks/branch_check.rb
@@ -42,7 +42,7 @@ module Gitlab
def prohibited_branch_checks
return if deletion?
- if branch_name =~ /\A\h{40}\z/
+ if branch_name =~ %r{\A\h{40}(/|\z)}
raise GitAccess::ForbiddenError, ERROR_MESSAGES[:prohibited_hex_branch_name]
end
end