GitRepo.isBare

Check if this repository is a bare repository.

struct GitRepo
@property
bool
isBare
(
)

Examples

// existing repo is not bare
auto repo = openRepository(_testRepo);
assert(!repo.isBare);
// new bare repo is bare
auto repo = initRepo(_userRepo, OpenBare.yes);
scope(exit) rmdirRecurse(_userRepo);
assert(repo.isBare);
// new non-bare repo is not bare
auto repo = initRepo(_userRepo, OpenBare.no);
scope(exit) rmdirRecurse(_userRepo);
assert(!repo.isBare);

Meta