Parse a string value as a path.
A leading '~' will be expanded to the global search path (which
defaults to the user's home directory but can be overridden via
git_libgit2_opts()
.
If the value does not begin with a tilde, the input will be returned.
the path to evaluate
0 or an error code.