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
11
use crate::remote_proto::do_fetch;

pub(crate) async fn cmd_fetch(
    remote: &str,
    depth: Option<u32>,
) -> Result<(), Box<dyn std::error::Error>> {
    let mut repo = suture_core::repository::Repository::open(std::path::Path::new("."))?;
    let new_patches = do_fetch(&mut repo, remote, depth).await?;
    println!("Fetch successful: {} new patch(es)", new_patches);
    Ok(())
}