git_repository_is_empty

Check if a repository is empty

An empty repository has just been initialized and contains no references apart from HEAD, which must be pointing to the unborn master branch, or the branch specified for the repository in the init.defaultBranch configuration variable.

extern (C) nothrow @nogc public
int
git_repository_is_empty

Parameters

repo libgit2.types.git_repository*

Repo to test

Return Value

Type: int

1 if the repository is empty, 0 if it isn't, error code if the repository is corrupted

Meta