libgit2

git_repository_is_empty

Version:

Check if a repository is empty

An empty repository has just been initialized and contains no references.

Signature

int git_repository_is_empty(git_repository *repo);

Parameters

In
repo

Repo to test

Returns

int

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

Versions