pub struct WorktreeHandle {
pub path: PathBuf,
pub branch_name: String,
pub base_ref_resolved: String,
pub subagent_id: String,
pub created_at: SystemTime,
}Expand description
A live record of a git worktree that WorktreeManager
has created for a subagent.
Handles are stored in-memory for the duration of the session. They are not
persisted to disk; on restart, WorktreeManager::reconcile
re-discovers handles from the git worktree registry.
Fields§
§path: PathBufAbsolute path on disk where the worktree was checked out.
branch_name: StringThe git branch name created for this worktree.
For worktrees discovered by WorktreeManager::reconcile
that are on a detached HEAD, this is DETACHED_BRANCH_SENTINEL rather
than an actual branch name.
base_ref_resolved: StringThe resolved base ref used to create the branch.
"HEAD" for WorktreeBaseRef::Head,
"origin/{branch}" for WorktreeBaseRef::Fresh.
subagent_id: StringThe subagent identifier that this worktree was created for.
created_at: SystemTimeWall-clock time when the worktree was created.
Trait Implementations§
Source§impl Clone for WorktreeHandle
impl Clone for WorktreeHandle
Source§fn clone(&self) -> WorktreeHandle
fn clone(&self) -> WorktreeHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more