use anyhow::{Context, Result};
use std::path::Path;
pub async fn bare_clone(url: &str, dest: &Path) -> Result<()> {
let url = url.to_string();
let dest = dest.to_path_buf();
tokio::task::spawn_blocking(move || {
git2::build::RepoBuilder::new()
.bare(true)
.clone(&url, &dest)
.context("Failed to perform bare clone")?;
Ok(())
})
.await?
}