Skip to main content

dot_git_present

Function dot_git_present 

Source
fn dot_git_present(cwd: &Path) -> bool
Expand description

Whether .git is on disk, without following symlinks - a dangling .git symlink is a broken checkout rather than an absent repo, and Path::try_exists reports it as missing because it stats the target. Anything but a definite “not found” counts as present, so an unreadable parent biases to RepoPresence::Unusable as well.