diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-07-12 00:44:07 +0200 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-07-12 01:06:13 +0200 |
commit | 84f18e358742b77bfc815f2a360a41f3f1b9abd7 (patch) | |
tree | 81612cf8bdb5c3061f7c133023a39c966d0b9aee /include/git2/refs.h | |
parent | 874303d468f7c8ef265bcdca8cde3cab547b5610 (diff) | |
download | libgit2-84f18e358742b77bfc815f2a360a41f3f1b9abd7.tar.gz |
refs: introduce git_reference_remote_tracking_from_branch()
Diffstat (limited to 'include/git2/refs.h')
-rw-r--r-- | include/git2/refs.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/git2/refs.h b/include/git2/refs.h index 7f6eb0e9b..b119e90b1 100644 --- a/include/git2/refs.h +++ b/include/git2/refs.h @@ -363,6 +363,27 @@ GIT_EXTERN(int) git_reference_foreach_glob( */ GIT_EXTERN(int) git_reference_has_log(git_reference *ref); + +/** + * Return the reference supporting the remote tracking branch, + * given a reference branch. + * + * The input reference has to be located in the `refs/heads` + * namespace. + * + * @param tracking_ref Pointer where to store the retrieved + * reference. + * + * @param branch_ref A git local branch reference. + * + * @return 0 on success; GIT_ENOTFOUND when no remote tracking + * reference exists, otherwise an error code. + */ +GIT_EXTERN(int) git_reference_remote_tracking_from_branch( + git_reference **tracking_ref, + git_reference *branch_ref +); + /** @} */ GIT_END_DECL #endif |