Lookup a reference by its name in the repository.
The generated reference is owned by the repository and should not be freed by the user.
TODO: - Ensure the reference name is valid
pointer to the looked-up reference
the repository to look up the reference
the long name for the reference (e.g. HEAD, ref/heads/master, refs/tags/v0.1.0, ...)
a reference to the reference