MCPcopy Create free account
hub / github.com/dtormoen/tsk-tsk / remove_remote

Function remove_remote

src/git_operations.rs:233–249  ·  view source on GitHub ↗
(repo_path: &Path, remote_name: &str)

Source from the content-addressed store, hash-verified

231}
232
233pub async fn remove_remote(repo_path: &Path, remote_name: &str) -> Result<(), String> {
234 tokio::task::spawn_blocking({
235 let repo_path = repo_path.to_owned();
236 let remote_name = remote_name.to_owned();
237 move || -> Result<(), String> {
238 let repo = Repository::open(&repo_path)
239 .map_err(|e| format!("Failed to open repository: {e}"))?;
240
241 repo.remote_delete(&remote_name)
242 .map_err(|e| format!("Failed to remove temporary remote: {e}"))?;
243
244 Ok(())
245 }
246 })
247 .await
248 .map_err(|e| format!("Task join error: {e}"))?
249}
250
251/// Check if a branch has commits that are not in the base branch
252pub async fn has_commits_not_in_base(

Callers 3

fetch_changesMethod · 0.85

Calls

no outgoing calls

Tested by 1