libgit2

git_branch_is_head

Version:

Determine if HEAD points to the given branch

Signature

int git_branch_is_head(const git_reference *branch);

Parameters

In
branch

A reference to a local branch.

Returns

int

1 if HEAD points at the branch, 0 if it isn't, or a negative value as an error code.

Versions