MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / track_worktree_branch

Function track_worktree_branch

src/daemon/git_watch.rs:697–708  ·  view source on GitHub ↗

Proactively tracks a linked worktree's branch. Returns the [`crate::branch::BranchAddOutcome`] name for logging, or `None` on error.

(wt_root: PathBuf, branch: String)

Source from the content-addressed store, hash-verified

695/// Proactively tracks a linked worktree's branch. Returns the
696/// [`crate::branch::BranchAddOutcome`] name for logging, or `None` on error.
697async fn track_worktree_branch(wt_root: PathBuf, branch: String) -> Option<String> {
698 match TraceDecay::add_branch_tracking_with_options(
699 &wt_root,
700 &branch,
701 TraceDecayOpenOptions::default(),
702 )
703 .await
704 {
705 Ok(outcome) => Some(format!("{outcome:?}")),
706 Err(_) => None,
707 }
708}
709
710/// Resolves a `worktrees/<name>` leaf to `(worktree_root, branch)` by reading
711/// its `gitdir` file and the linked HEAD.

Callers 1

execute_planFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected