libgit2

git_branch_is_head

Version:

Determine if the current local branch is pointed at by HEAD.

Signature

int git_branch_is_head(const git_reference *branch);

Parameters

In
branch

Current underlying reference of the branch.

Returns

int

1 if HEAD points at the branch, 0 if it isn't, error code otherwise.

Versions