use crate::ShackleError; use git2::{Repository, RepositoryInitOptions}; use std::path::PathBuf; pub fn init(repo_name: &str) -> Result<(), ShackleError> { let mut path = PathBuf::from("git"); path.push(repo_name); path.set_extension("git"); Repository::init_opts( path, &RepositoryInitOptions::new() .bare(true) .mkdir(true) .no_reinit(true), )?; Ok(()) }