mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-29 14:00:31 +08:00
cli: implement the rad remote rm command
Implementing the `rad remote rm` command in order to be able to remote a remote inside the radicle remote list. Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
use crate::git;
|
||||
use crate::terminal as term;
|
||||
|
||||
pub fn run(repository: &git::Repository, name: &str) -> anyhow::Result<()> {
|
||||
if !git::is_remote(repository, name)? {
|
||||
anyhow::bail!("remote `{name}` not found");
|
||||
}
|
||||
repository.remote_delete(name)?;
|
||||
term::success!("Remote `{name}` removed");
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user