diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2014-11-08 20:00:17 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-11-08 20:00:17 +0100 |
| commit | 82374d9825040914a3cfd8ceeaf60f76b93fe638 (patch) | |
| tree | 1916da249f0bb5d25d77ad7bec7bb1a912816f53 /include/git2/branch.h | |
| parent | 4e1b3b3b7186b017223b8302a51289ff92ccba25 (diff) | |
| download | libgit2-82374d9825040914a3cfd8ceeaf60f76b93fe638.tar.gz | |
branch: add getter for the upstream remote name
This gets the value from branch.<foo>.remote.
Diffstat (limited to 'include/git2/branch.h')
| -rw-r--r-- | include/git2/branch.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/git2/branch.h b/include/git2/branch.h index f28410000..888781037 100644 --- a/include/git2/branch.h +++ b/include/git2/branch.h @@ -260,6 +260,17 @@ GIT_EXTERN(int) git_branch_remote_name( git_repository *repo, const char *canonical_branch_name); + +/** + * Retrieve the name fo the upstream remote of a local branch + * + * @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_remote(git_buf *buf, git_repository *repo, const char *refname); + /** @} */ GIT_END_DECL #endif |
