Skip to main content

Module git

Module git 

Source

Structs§

CatFileBatch
ResolvedRange

Enums§

GitError
IgnoreSource
Which rule family excluded a path. .diffctx/ignore is a declared confidentiality policy, so its exclusions are surfaced only as a count; gitignore exclusions are mundane and can be listed by path (#188).

Functions§

find_ignored_paths
Returns the subset of rel_paths (repo-root-relative) excluded by either .gitignore (via git’s own engine, so nesting/negation/** are handled correctly) or .diffctx/ignore (patterns anchored per-directory and fed to git as a temporary core.excludesFile, so the same engine evaluates both mechanisms uniformly). Best-effort: any failure returns an empty set rather than blocking the diff pipeline on an ignore-resolution problem.
find_ignored_paths_with_source
find_toplevel
Resolves the actual working-tree root for path, which may be a subdirectory of the repository. git diff/git cat-file paths are always reported relative to this root, not to an arbitrary -C cwd - running the pipeline with path still set to a subdirectory silently produces zero fragments because file lookups get double-prefixed (e.g. src/src/app.py).
get_changed_files
get_commit_message
get_deleted_files
get_diff_text
get_rename_pairs
Rename pairs as repo-relative display paths (old -> new), for the output header. Unlike get_renamed_paths this preserves the pairing and does not canonicalize (the old path no longer exists on disk).
get_renamed_paths
Rename source paths, canonicalized. These no longer exist on disk and cannot be fragmented, so the pipeline excludes them from the changed set. The rename destinations need no special handling: they exist on HEAD and reach the universe through the ordinary changed-file path.
get_untracked_files
git_command
Always targets the repo via -C.
is_git_repo
parse_diff
resolve_duration_range
Resolves a duration spec to the last commit before the window.
run_git
run_git_z
set_git_timeout
show_file_at_revision
split_diff_range

Type Aliases§

Result