The generated reference must be freed by the user.
The branch name will be checked for validity.
@see git_tag_create for rules about valid names.
@param out_ pointer to the looked-up branch reference
@param repo the repository to look up the branch
@param branch_name Name of the branch to be looked-up;
this name is validated for consistency.
@param branch_type Type of the considered branch. This should
be valued with either git_branch_t.GIT_BRANCH_LOCAL or git_branch_t.GIT_BRANCH_REMOTE.
@return 0 on success; git_error_code.GIT_ENOTFOUND when no matching branch
exists, git_error_code.GIT_EINVALIDSPEC, otherwise an error code.
Lookup a branch by its name in a repository.
The generated reference must be freed by the user. The branch name will be checked for validity.
@see git_tag_create for rules about valid names.
@param out_ pointer to the looked-up branch reference @param repo the repository to look up the branch @param branch_name Name of the branch to be looked-up; this name is validated for consistency. @param branch_type Type of the considered branch. This should be valued with either git_branch_t.GIT_BRANCH_LOCAL or git_branch_t.GIT_BRANCH_REMOTE.
@return 0 on success; git_error_code.GIT_ENOTFOUND when no matching branch exists, git_error_code.GIT_EINVALIDSPEC, otherwise an error code.