From fb910281d6598e2c235f6ec93384d4e08838d655 Mon Sep 17 00:00:00 2001 From: nulltoken Date: Fri, 20 Jul 2012 16:38:54 +0200 Subject: branch: introduce git_branch_tracking() --- include/git2/branch.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/git2') diff --git a/include/git2/branch.h b/include/git2/branch.h index 724cfba12..15894b709 100644 --- a/include/git2/branch.h +++ b/include/git2/branch.h @@ -136,6 +136,22 @@ GIT_EXTERN(int) git_branch_lookup( const char *branch_name, git_branch_t branch_type); +/** + * Return the reference supporting the remote tracking branch, + * given a local branch reference. + * + * @param tracking_out Pointer where to store the retrieved + * reference. + * + * @param branch Current underlying reference of the branch. + * + * @return 0 on success; GIT_ENOTFOUND when no remote tracking + * reference exists, otherwise an error code. + */ +GIT_EXTERN(int) git_branch_tracking( + git_reference **tracking_out, + git_reference *branch); + /** @} */ GIT_END_DECL #endif -- cgit v1.2.1