Expand description
Changed-file helpers exposed through the engine boundary for editor and embedding surfaces.
Enums§
- Changed
Files Error - Classification of a
git difffailure, so callers can pick their own wording (soft warning vs hard error) without re-parsing stderr.
Functions§
- filter_
duplication_ by_ changed_ files - Filter a duplication report to only retain clone groups where at least one instance belongs to a changed file. Families, mirrored directories, and stats are rebuilt from the surviving groups so consumers see consistent, correctly-scoped numbers.
- filter_
results_ by_ changed_ files - Filter
resultsto only include issues whose source file is inchanged_files. - get_
changed_ files - Get files changed since a git ref. Returns
Noneon git failure after printing a warning to stderr. Used by--changed-sinceand--file, where a failure falls back to full-scope analysis. - resolve_
git_ common_ dir - Resolve the canonical git common directory for
cwd. - resolve_
git_ toplevel - Resolve the canonical git toplevel for
cwd. - set_
spawn_ hook - Install a spawn-hook for this module’s git subprocesses. Idempotent;
subsequent calls are no-ops. Called once from the CLI’s
main()so long-running watch sessions reap pending git children on Ctrl+C. Defaults toCommand::outputwhen not set; the function-pointer indirection costs nothing for embedders and tests that don’t install a hook. - try_
get_ changed_ diff - Get the zero-context unified diff of the merge-base range
git_ref...HEAD, with paths relative toroot, for the line-level security gate (issue #886). - try_
get_ changed_ files - Get files changed since a git ref. Returns
Err(with details) when the git invocation itself failed, so callers can choose between warn-and-ignore and hard-error behavior. - try_
get_ changed_ files_ with_ toplevel - Like
try_get_changed_files, but takes a pre-resolved canonicaltoplevelso callers (the LSP) can cache it across runs and avoid the extragit rev-parse --show-toplevelsubprocess on every save. - validate_
git_ ref - Validate a user-supplied git ref before passing it to
git diff.