Skip to main content

Module git_ops

Module git_ops 

Source
Expand description

Low-level git worktree operations.

Provides utilities for creating, managing, and removing git worktrees. These functions handle the mechanics of worktree lifecycle management.

§Doc Audit

  • audited: 2026-01-25
  • docs: scale/isolation.md
  • ignore: false

Structs§

MergeCleanupResult
Result of a merge operation

Functions§

commit_in_worktree
Commits changes in a worktree.
copy_spec_to_worktree
Copies the spec file from the main working directory to a worktree.
create_worktree
Creates a new git worktree for the given spec.
get_active_worktree
Returns the worktree path for a spec if an active worktree exists.
has_uncommitted_changes
Checks if a worktree has uncommitted changes.
isolate_worktree_specs
Isolates the worktree environment by removing all specs except the working spec.
merge_and_cleanup
Merges a branch to main and cleans up.
remove_worktree
Removes a git worktree and cleans up its directory.
worktree_path_for_spec
Returns the worktree path for a given spec ID.