Functions§
- branch_
exists - Check if a branch already exists.
- detect_
capabilities - Build a
GitCapabilitiesstruct from a detectedGitVersion. - detect_
git_ version - Run
git --version, parse the result, and validate against minimum version. ReturnsGitCapabilitieson success. - parse_
git_ version - Parse the output of
git --versioninto aGitVersion. - parse_
worktree_ list_ porcelain - Parse the porcelain output of
git worktree listintoWorktreeHandles. - post_
create_ git_ crypt_ check - Post-create git-crypt check on the new worktree path. Returns Ok(()) if the worktree is safe, Err(GitCryptLocked) if encrypted files detected.
- resolve_
ref - Resolve a ref to its 40-char SHA.
- run_
worktree_ list - Run
git worktree list --porcelain [-z]and parse the output. - worktree_
add - Run
git worktree addwith the appropriate flags. Returns Ok(()) on success. - worktree_
remove - Run
git worktree remove <path>(non-force). - worktree_
remove_ force - Run
git worktree remove --force <path>.