diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2013-03-30 04:27:42 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@elego.de> | 2013-04-11 12:27:25 +0200 |
commit | d59942c2aba2fa5f9570b37e3bc9eaf34f16d671 (patch) | |
tree | 1afd5eb25931f18f1579176741ac9883eac84e16 /include/git2/branch.h | |
parent | 97016f29ab2359da5c59e2acae6369794fceb9d4 (diff) | |
download | libgit2-d59942c2aba2fa5f9570b37e3bc9eaf34f16d671.tar.gz |
branch: add more upstream configuration management
Add functions to set and unset the upstream configuration to
complement the getter we already have.
Diffstat (limited to 'include/git2/branch.h')
-rw-r--r-- | include/git2/branch.h | 12 |
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. * |