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.h16
1 files changed, 16 insertions, 0 deletions
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