suture-cli 1.0.0

A patch-based version control system with semantic merge for structured files
1
2
3
4
5
6
7
8
9
10
pub(crate) async fn cmd_gc() -> Result<(), Box<dyn std::error::Error>> {
    let repo = suture_core::repository::Repository::open(std::path::Path::new("."))?;
    let result = repo.gc()?;
    println!("Garbage collection complete.");
    println!("  {} patch(es) removed", result.patches_removed);
    if result.patches_removed > 0 {
        println!("  Hint: reopen the repository to fully update the in-memory DAG");
    }
    Ok(())
}