chore: upgrade to libgit2-1.2.0

This commit is contained in:
Aleksey Kulikov 2021-09-17 18:22:01 +03:00
parent b83fea9360
commit a1e420d86c
36 changed files with 2889 additions and 1024 deletions

View file

@ -304,6 +304,31 @@ GIT_EXTERN(int) git_branch_remote_name(
*/
GIT_EXTERN(int) git_branch_upstream_remote(git_buf *buf, git_repository *repo, const char *refname);
/**
* Retrieve the upstream merge of a local branch
*
* This will return the currently configured "branch.*.merge" for a given
* branch. This branch must be local.
*
* @param buf the buffer into which to write the name
* @param repo the repository in which to look
* @param refname the full name of the branch
* @return 0 or an error code
*/
GIT_EXTERN(int) git_branch_upstream_merge(git_buf *buf, git_repository *repo, const char *refname);
/**
* Determine whether a branch name is valid, meaning that (when prefixed
* with `refs/heads/`) that it is a valid reference name, and that any
* additional branch name restrictions are imposed (eg, it cannot start
* with a `-`).
*
* @param valid output pointer to set with validity of given branch name
* @param name a branch name to test
* @return 0 on success or an error code
*/
GIT_EXTERN(int) git_branch_name_is_valid(int *valid, const char *name);
/** @} */
GIT_END_DECL
#endif