Select Git revision
git_ref_validator.rb
Forked from
GitLab.org / GitLab FOSS
25867 commits behind the upstream repository.
-
Robert Speicher authored
Closes #3311
Robert Speicher authoredCloses #3311
git_ref_validator.rb 350 B
module Gitlab
module GitRefValidator
extend self
# Validates a given name against the git reference specification
#
# Returns true for a valid reference name, false otherwise
def validate(ref_name)
Gitlab::Utils.system_silent(
%W(#{Gitlab.config.git.bin_path} check-ref-format refs/#{ref_name}))
end
end
end