Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
heartwood crates radicle-cli src commands remote rm.rs
use crate::git;
use crate::terminal as term;

pub fn run(name: &str, repository: &git::Repository) -> anyhow::Result<()> {
    if !git::is_remote(repository, name)? {
        anyhow::bail!("remote `{name}` not found");
    }
    repository.remote_delete(name)?;
    term::success!("Remote `{name}` removed");
    Ok(())
}