// by default test repo's HEAD is pointing to a commit
auto repo1 = GitRepo(_testRepo);
assert(repo1.isHeadDetached);
// new repo does not have a detached head
auto repo2 = initRepo(_userRepo, OpenBare.no);
scope(exit) rmdirRecurse(_userRepo);
assert(!repo2.isHeadDetached);
Check if this repository's HEAD is detached.
A repository's HEAD is detached when it points directly to a commit instead of a branch.