..
auth
block
checkout
clean
clone
cob
config
debug
follow
fork
id
inbox
init
inspect
issue
ls
node
patch
path
publish
remote
seed
self
stats
sync
unblock
unfollow
unseed
watch
auth.rs
block.rs
checkout.rs
clean.rs
clone.rs
cob.rs
config.rs
debug.rs
diff.rs
follow.rs
fork.rs
id.rs
inbox.rs
init.rs
inspect.rs
issue.rs
ls.rs
node.rs
patch.rs
path.rs
publish.rs
remote.rs
seed.rs
self.rs
stats.rs
sync.rs
unblock.rs
unfollow.rs
unseed.rs
watch.rs
mod args;
use radicle::storage;
use radicle::storage::WriteStorage;
use crate::terminal as term;
pub use args::Args;
pub fn run(args: Args, ctx: impl term::Context) -> anyhow::Result<()> {
let profile = ctx.profile()?;
let storage = &profile.storage;
let rid = args.repo;
let path = storage::git::paths::repository(storage, &rid);
if !path.exists() {
anyhow::bail!("repository {rid} was not found");
}
if args.no_confirm || term::confirm(format!("Clean {rid}?")) {
let cleaned = storage.clean(rid)?;
for remote in cleaned {
term::info!("Removed {remote}");
}
term::success!("Successfully cleaned {rid}");
}
Ok(())
}