Skip to main content

Module source

Module source 

Source
Expand description

Abstraction over “a snapshot of the repository” (working tree or a git rev).

Structs§

FsSource
GitTreeSource

Constants§

DEFAULT_EXCLUDED_DIRS
Directory names always excluded from scanning.

Traits§

Source
Lists and reads files of a repository snapshot. Paths are repo-relative, /-separated, and sorted. Symlinks are not included. Paths under .git, target, .miwa, .worktrees, node_modules, obj, and dist are excluded (directory names at any depth; files with those names are not). Further directory names can be excluded via exclude in the config, which is applied in build_graph.

Functions§

is_not_found
Whether err is a Source::read failure caused by the path not existing (as opposed to, say, a git invocation failure). Callers use this to distinguish “file absent” from a real execution error.
is_under_dir_named
Whether any parent-directory segment of path (the file name itself is not considered) equals one of names.
merge_base
Returns the first line of git merge-base <base> HEAD run in repo.