libgit2

git_repository_head_unborn

Version:

Check if the current branch is unborn

An unborn branch is one named from HEAD but which doesn't exist in the refs namespace, because it doesn't have any commit to point to.

Signature

int git_repository_head_unborn(git_repository *repo);

Parameters

In
repo

Repo to test

Returns

int

1 if the current branch is unborn, 0 if it's not; error code if there was an error

Versions