Skip to main content

Module git

Module git 

Source

Structs§

CatFileBatch

Enums§

GitError

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_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
get_untracked_files
git_command
Always targets the repo via -C.
is_git_repo
parse_diff
run_git
run_git_z
set_git_timeout
show_file_at_revision
split_diff_range

Type Aliases§

Result