Retrieve and resolve the reference pointed at by HEAD.
The returned git_reference will be owned by caller and
git_reference_free() must be called when done with it to release the
allocated memory and prevent a leak.
@param out pointer to the reference which will be retrieved
@param repo a repository object
@return 0 on success, GIT_EORPHANEDHEAD when HEAD points to a non existing
branch, GIT_ENOTFOUND when HEAD is missing; an error code otherwise
Retrieve and resolve the reference pointed at by HEAD.
The returned git_reference will be owned by caller and git_reference_free() must be called when done with it to release the allocated memory and prevent a leak.
@param out pointer to the reference which will be retrieved @param repo a repository object
@return 0 on success, GIT_EORPHANEDHEAD when HEAD points to a non existing branch, GIT_ENOTFOUND when HEAD is missing; an error code otherwise