MCPcopy Create free account
hub / github.com/ForgeAILab/forge / remove_worktree

Function remove_worktree

crates/git/src/lib.rs:111–123  ·  view source on GitHub ↗

Remove a worktree.

(repo_path: &Path, worktree_path: &Path)

Source from the content-addressed store, hash-verified

109
110/// Remove a worktree.
111pub async fn remove_worktree(repo_path: &Path, worktree_path: &Path) -> Result<()> {
112 run_git(
113 repo_path,
114 &[
115 "worktree",
116 "remove",
117 "--force",
118 &worktree_path.to_string_lossy(),
119 ],
120 )
121 .await?;
122 Ok(())
123}
124
125/// Get the current HEAD SHA.
126pub async fn get_current_sha(worktree_path: &Path) -> Result<String> {

Callers 5

test_merge_conflictFunction · 0.85
test_rebase_cleanFunction · 0.85

Calls 1

run_gitFunction · 0.70

Tested by 5

test_merge_conflictFunction · 0.68
test_rebase_cleanFunction · 0.68