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
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2015-12-16 21:29:31 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2015-12-16 21:34:03 +0300
commit9c266d49354e9f7f86c76b00fbe800912f475153 (patch)
treea7c5294321d441d7a9fb254453e74588642fee33 /app/services/create_branch_service.rb
parent76642d7a805e572ddd7608efa4f6f33de42fa1ce (diff)
Add more descriptive error message when create branch with invalid name
Diffstat (limited to 'app/services/create_branch_service.rb')
-rw-r--r--app/services/create_branch_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/create_branch_service.rb b/app/services/create_branch_service.rb
index de18f3bc556..6a77f51628e 100644
--- a/app/services/create_branch_service.rb
+++ b/app/services/create_branch_service.rb
@@ -4,7 +4,7 @@ class CreateBranchService < BaseService
def execute(branch_name, ref)
valid_branch = Gitlab::GitRefValidator.validate(branch_name)
if valid_branch == false
- return error('Branch name invalid')
+ return error("Branch name can't contains space, '~', '^', ':', '?', '*', '[', '\', '..', '@{', and consecutive slashes, start with '/' or '.' or end in '/' or '.' or '.lock'")
end
repository = project.repository