Lookup a reference by name in a repository.
The returned reference must be freed by the user.
The name will be checked for validity.
See git_reference_symbolic_create()
for rules about valid names.
the long name for the reference (e.g. HEAD, refs/heads/master, refs/tags/v0.1.0, ...)
0 on success, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code.