Check if the current branch is an orphan.
An orphan branch is one named from HEAD but which doesn't exist in the refs namespace, because it doesn't have any commit to point to.
1 auto repo1 = openRepository(_testRepo); 2 assert(!repo1.isHeadOrphan); 3 4 // new repo has orphan branch 5 auto repo2 = initRepo(_userRepo, OpenBare.no); 6 scope(exit) rmdirRecurse(_userRepo); 7 assert(repo2.isHeadOrphan);
See Implementation
Check if the current branch is an orphan.
An orphan branch is one named from HEAD but which doesn't exist in the refs namespace, because it doesn't have any commit to point to.