Skip to main content

is_git_repo

Function is_git_repo 

Source
pub fn is_git_repo(path: &Path) -> bool
Expand description

Check if a path is a valid Git repository.

.git is a directory in a normal clone but a file containing a gitdir: pointer in linked worktrees and submodules. Accepting both means dev-prune stops silently ignoring every worktree and submodule on the machine.