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.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/git2/branch.h b/include/git2/branch.h
index 28bb1f5f0..4df2d353a 100644
--- a/include/git2/branch.h
+++ b/include/git2/branch.h
@@ -178,6 +178,18 @@ GIT_EXTERN(int) git_branch_upstream(
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.
*