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

1 // existing repo is non-empty
2 auto repo1 = openRepository(_testRepo);
3 assert(!repo1.isEmpty);
4 
5 // new repo is empty
6 auto repo2 = initRepo(_userRepo, OpenBare.no);
7 scope(exit) rmdirRecurse(_userRepo);
8 assert(repo2.isEmpty);

Meta