MCPcopy Create free account
hub / github.com/AI45Lab/Code / default_local_worktree_path

Function default_local_worktree_path

core/src/workspace/local.rs:586–594  ·  view source on GitHub ↗
(root: &Path, branch: &str)

Source from the content-addressed store, hash-verified

584}
585
586fn default_local_worktree_path(root: &Path, branch: &str) -> PathBuf {
587 let repo_name = root
588 .file_name()
589 .map(|name| name.to_string_lossy().to_string())
590 .unwrap_or_else(|| "repo".to_string());
591 root.parent()
592 .unwrap_or(root)
593 .join(format!("{repo_name}-{branch}"))
594}
595
596pub(super) fn normalize_local_path(root: &Path, input: &str) -> Result<WorkspacePath> {
597 let input = default_path_input(input);

Callers 1

create_worktreeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected