summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2012-10-08 15:25:44 -0700
committerBen Straub <bs@github.com>2012-10-08 15:25:44 -0700
commit9adfa7d147b319593789cbaeea94a97141b1e4f8 (patch)
treebd9a22164040adc03d389aa101e9d480cb2ce775 /include/git2
parent543864b677704845660085d2b2b2249cabb084a4 (diff)
parentbf0e62a2b8b6116ae61dae37f95a3eb840246ec6 (diff)
downloadlibgit2-9adfa7d147b319593789cbaeea94a97141b1e4f8.tar.gz
Merge pull request #949 from nulltoken/topic/deploy_repository_set_head
Deploy git_repository_set_head()
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/branch.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/git2/branch.h b/include/git2/branch.h
index f072799c5..f06609a51 100644
--- a/include/git2/branch.h
+++ b/include/git2/branch.h
@@ -148,6 +148,17 @@ GIT_EXTERN(int) git_branch_tracking(
git_reference **tracking_out,
git_reference *branch);
+/**
+ * Determine if the current local branch is pointed at by HEAD.
+ *
+ * @param branch Current underlying reference of the branch.
+ *
+ * @return 1 if HEAD points at the branch, 0 if it isn't,
+ * error code otherwise.
+ */
+GIT_EXTERN(int) git_branch_is_head(
+ git_reference *branch);
+
/** @} */
GIT_END_DECL
#endif