summaryrefslogtreecommitdiff
path: root/include/git2/branch.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/branch.h')
-rw-r--r--include/git2/branch.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/git2/branch.h b/include/git2/branch.h
index 89a1396af..b15171360 100644
--- a/include/git2/branch.h
+++ b/include/git2/branch.h
@@ -171,11 +171,23 @@ GIT_EXTERN(int) git_branch_name(const char **out,
* @return 0 on success; GIT_ENOTFOUND when no remote tracking
* reference exists, otherwise an error code.
*/
-GIT_EXTERN(int) git_branch_tracking(
+GIT_EXTERN(int) git_branch_upstream(
git_reference **out,
git_reference *branch);
/**
+ * Set the upstream configuration for a given local branch
+ *
+ * @param branch the branch to configure
+ *
+ * @param upstream_name remote-tracking or local branch to set as
+ * upstream. Pass NULL to unset.
+ *
+ * @return 0 or an error code
+ */
+GIT_EXTERN(int) git_branch_set_upstream(git_reference *branch, const char *upstream_name);
+
+/**
* Return the name of the reference supporting the remote tracking branch,
* given the name of a local branch reference.
*
@@ -193,7 +205,7 @@ GIT_EXTERN(int) git_branch_tracking(
* including the trailing NUL byte; GIT_ENOTFOUND when no remote tracking
* reference exists, otherwise an error code.
*/
-GIT_EXTERN(int) git_branch_tracking_name(
+GIT_EXTERN(int) git_branch_upstream_name(
char *tracking_branch_name_out,
size_t buffer_size,
git_repository *repo,