Expand description
Language-agnostic git utilities.
Provides shared git operations used across all language crates:
- File reading from git refs (
read_git_file) - File diffing between refs (
git_diff_file) - Ref name sanitization (
sanitize_ref_name) - Worktree path computation (
worktree_path_for) - RAII worktree management (
WorktreeGuard)
These utilities were consolidated from duplicate implementations in
crates/ts/ and crates/java/. Language crates should use these
directly (or compose with WorktreeGuard) rather than reimplementing
git plumbing.
Structs§
- Deprecation
Commit - A commit that added files to a deprecated component directory.
- Worktree
Guard - RAII guard for a temporary git worktree.
Functions§
- commit_
co_ changed_ families - Find component families whose source files were modified in the given commit.
- find_
deprecation_ commits - Find commits between
from_refandto_refthat added files todeprecated/components/directories (i.e., commits that deprecated a component). - git_
diff_ file - Get the diff of a single file between two refs via
git diff <from>..<to> -- <path>. - read_
git_ file - Read a file from a git ref via
git show <ref>:<path>. - sanitize_
ref_ name - Sanitize a git ref name for use as a directory name.
- worktree_
dir_ for - Return the parent directory for all worktrees of a given repo.
- worktree_
path_ for - Generate a deterministic worktree path for a given ref.