MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / reset_worktree

Function reset_worktree

crates/opencode-server/src/routes.rs:4202–4208  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4200}
4201
4202async fn reset_worktree() -> Result<Json<bool>> {
4203 let cwd = std::env::current_dir().map_err(|e| ApiError::BadRequest(e.to_string()))?;
4204
4205 worktree::prune_worktrees(&cwd).map_err(|e| ApiError::BadRequest(e.to_string()))?;
4206
4207 Ok(Json(true))
4208}
4209
4210#[derive(Debug, Serialize)]
4211pub struct ResourceInfo {

Callers

nothing calls this directly

Calls 1

prune_worktreesFunction · 0.85

Tested by

no test coverage detected