Function git_repository::discover::is_git
source · [−]Expand description
What constitutes a valid git repository, returning the guessed repository kind purely based on the presence of files. Note that the git-config ultimately decides what’s bare.
Returns the Kind of git directory that was passed, possibly alongside the supporting private worktree git dir
Note that .git
files are followed to a valid git directory, which then requires
- a valid head
- an objects directory
- a refs directory