Expand description
Find git repositories or search them upwards from a starting point, or determine if a directory looks like a git repository.
Note that detection methods are educated guesses using the presence of files, without looking too much into the details.
Modules§
Constants§
- DOT_
GIT_ DIR - The name of the
.gitdirectory. - MODULES
- The name of the
modulessub-directory within a.gitdirectory for keeping submodule checkouts.
Functions§
- is_bare
- Returns true if the given
git_dirseems to be a bare repository. - is_git
- 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.
- is_
submodule_ git_ dir - Returns true if
git_diris located within a.git/modulesdirectory, indicating it’s a submodule clone. - upwards
- Find the location of the git repository directly in
directoryor in any of its parent directories, and provide the trust level derived from Path ownership. - upwards_
opts - Find the location of the git repository directly in
directoryor in any of its parent directories and provide an associated Trust level by looking at the git directory’s ownership, and control discovery usingoptions.