summaryrefslogtreecommitdiff
path: root/include/git2/branch.h
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-07-20 16:38:54 +0200
committernulltoken <emeric.fermas@gmail.com>2012-07-24 16:09:48 +0200
commitfb910281d6598e2c235f6ec93384d4e08838d655 (patch)
tree03b18d2edfc6abfff5512b2e7b15b15bfbd44950 /include/git2/branch.h
parentbf9e8cc86b9c32946a395fd12a9b1a5cb71575a9 (diff)
downloadlibgit2-fb910281d6598e2c235f6ec93384d4e08838d655.tar.gz
branch: introduce git_branch_tracking()
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