GitRepo.isEmpty

Check if this repository is empty.

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

struct GitRepo
@property
bool
isEmpty
()

Examples

// existing repo is non-empty
auto repo1 = GitRepo(_testRepo);
assert(!repo1.isEmpty);

// new repo is empty
auto repo2 = initRepo(_userRepo, OpenBare.no);
scope(exit) rmdirRecurse(_userRepo);
assert(repo2.isEmpty);

Meta