Crate gix_discover

Source
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§

is_git
parse
path
repository
upwards

Constants§

DOT_GIT_DIR
The name of the .git directory.
MODULES
The name of the modules sub-directory within a .git directory for keeping submodule checkouts.

Functions§

is_bare
Returns true if the given git_dir seems 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_dir is located within a .git/modules directory, indicating it’s a submodule clone.
upwards
Find the location of the git repository directly in directory or 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 directory or in any of its parent directories and provide an associated Trust level by looking at the git directory’s ownership, and control discovery using options.