AKDQIWZIWFPPTORZY4HV2PDNDNZ2NN34YERTVCKR3IVLPT324KDAC
use std::path::Path;
use anyhow::Result;
use git2::Repository;
pub enum Vcs {
Git,
Pijul,
None,
}
pub fn init_vcs(vcs: &Vcs, path: &Path) -> Result<()> {
match vcs {
Vcs::Git => {
Repository::init(path)?;
}
Vcs::Pijul => {
//This is how cargo does it so it should be good enough for me
std::process::Command::new("pijul")
.current_dir(path)
.arg("init")
.current_dir(path)
.output()?;
}
Vcs::None => {}
}
Ok(())
}