diff options
| author | nulltoken <emeric.fermas@gmail.com> | 2012-10-06 10:41:53 +0200 |
|---|---|---|
| committer | nulltoken <emeric.fermas@gmail.com> | 2012-10-07 21:03:51 +0200 |
| commit | 0c78f685ebeed293c666815b1668b8209f4ff258 (patch) | |
| tree | d762c9fe275bd821a65c5d453b4c6c4ca8bbd914 /include/git2 | |
| parent | f3cc78340a7a0d2dab8a38c48fc80c6c36419450 (diff) | |
| download | libgit2-0c78f685ebeed293c666815b1668b8209f4ff258.tar.gz | |
branch: introduce git_branch_is_head()
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/branch.h | 11 |
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 |
