Re-implement Rugged::Reference.valid_name?(ref_name)
Follow-up for Remove Rugged patches from Rails (#421591 - closed)
Most of Rugged code was removed, but there is still a single instance when we rely on it.
Gitlab::GitRefValidator uses Rugged to validate the correctness of the git reference.
That's the only blocker that stops us from the full removal of rugged
gem.
Proposal
Re-implement Rugged reference check in Ruby.
Rugged implementation: https://github.com/libgit2/rugged/blob/ae109768286079e7c8b041c5c7c81962c08d9916/ext/rugged/rugged_reference.c#L43-L59