summaryrefslogtreecommitdiff
path: root/include/git2/refs.h
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-07-20 16:27:56 +0200
committernulltoken <emeric.fermas@gmail.com>2012-07-24 16:09:45 +0200
commit88bcd5153f6dc9e0c7ebc73a1e87c0da17e8df28 (patch)
treeb0277fc5af49421c445a55764c4cfd8485dc7947 /include/git2/refs.h
parenteed378b66960414942ac78840afbcb19bfffbf15 (diff)
downloadlibgit2-88bcd5153f6dc9e0c7ebc73a1e87c0da17e8df28.tar.gz
branch: introduce git_reference_is_branch()
Diffstat (limited to 'include/git2/refs.h')
-rw-r--r--include/git2/refs.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/git2/refs.h b/include/git2/refs.h
index b119e90b1..ac876ebb0 100644
--- a/include/git2/refs.h
+++ b/include/git2/refs.h
@@ -384,6 +384,16 @@ GIT_EXTERN(int) git_reference_remote_tracking_from_branch(
git_reference *branch_ref
);
+/**
+ * Check if a reference is a local branch.
+ *
+ * @param ref A git reference
+ *
+ * @return 1 when the reference lives in the refs/heads
+ * namespace; 0 otherwise.
+ */
+GIT_EXTERN(int) git_reference_is_branch(git_reference *ref);
+
/** @} */
GIT_END_DECL
#endif