summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-07-30 08:56:51 -0400
committerEdward Thomson <ethomson@edwardthomson.com>2021-07-30 08:56:51 -0400
commitcc68c19a3a6f025d94e332e856f43ab438dfbf08 (patch)
tree3224a0ba8e3c783418722829be97ad297e5d263a /include
parent47dd9f47972f0885b288a950714568c98f16a79e (diff)
parentf2915ec488898efe956c90c322fff67d0030f92f (diff)
downloadlibgit2-cc68c19a3a6f025d94e332e856f43ab438dfbf08.tar.gz
Merge branch 'pr/5861'
Diffstat (limited to 'include')
-rw-r--r--include/git2/branch.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/git2/branch.h b/include/git2/branch.h
index 0c0cc7ff7..24ea7f7d0 100644
--- a/include/git2/branch.h
+++ b/include/git2/branch.h
@@ -305,6 +305,19 @@ 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