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:
authorJacob Schatz <jschatz1@gmail.com>2017-10-05 18:05:48 +0300
committerStan Hu <stanhu@gmail.com>2017-10-06 00:56:36 +0300
commit351fde1b908296802fe65112f2ff1eb4aa6cb5db (patch)
tree02df0cff89997941c426c63409935b0e9641798b /lib/gitlab/git_ref_validator.rb
parent2e76b8a960313feedaaace06503cba097572747e (diff)
Prevent branches or tags from starting with invalid characters (e.g. -, .)
Closes #38817
Diffstat (limited to 'lib/gitlab/git_ref_validator.rb')
-rw-r--r--lib/gitlab/git_ref_validator.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/git_ref_validator.rb b/lib/gitlab/git_ref_validator.rb
index a3c6b21a6a1..2e3e4fc3f1f 100644
--- a/lib/gitlab/git_ref_validator.rb
+++ b/lib/gitlab/git_ref_validator.rb
@@ -11,7 +11,7 @@ module Gitlab
return false if ref_name.start_with?('refs/remotes/')
Gitlab::Utils.system_silent(
- %W(#{Gitlab.config.git.bin_path} check-ref-format refs/#{ref_name}))
+ %W(#{Gitlab.config.git.bin_path} check-ref-format --branch #{ref_name}))
end
end
end