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

Method run_blocking_git

core/src/workspace/local.rs:537–546  ·  view source on GitHub ↗
(&self, operation: F)

Source from the content-addressed store, hash-verified

535
536impl LocalWorkspaceBackend {
537 async fn run_blocking_git<T, F>(&self, operation: F) -> Result<T>
538 where
539 T: Send + 'static,
540 F: FnOnce(PathBuf) -> Result<T> + Send + 'static,
541 {
542 let root = self.root.clone();
543 tokio::task::spawn_blocking(move || operation(root))
544 .await
545 .map_err(|e| anyhow!("Git worker failed: {}", e))?
546 }
547
548 async fn run_git_command(&self, args: Vec<String>) -> Result<(bool, String, String)> {
549 tokio::task::spawn_blocking(crate::git::ensure_git_installed)

Callers 11

is_repositoryMethod · 0.80
statusMethod · 0.80
logMethod · 0.80
list_branchesMethod · 0.80
create_branchMethod · 0.80
diffMethod · 0.80
list_stashesMethod · 0.80
stashMethod · 0.80
list_worktreesMethod · 0.80
create_worktreeMethod · 0.80
remove_worktreeMethod · 0.80

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected