mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-10 05:06:46 +10:00
12 lines
294 B
Ruby
12 lines
294 B
Ruby
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)
|
|
system *%W(git check-ref-format refs/#{ref_name})
|
|
end
|
|
end
|
|
end
|