pars_core/git/mod.rs
1pub mod commit;
2
3use std::path::Path;
4
5use anyhow::Result;
6
7use crate::operation::git::git_io;
8
9pub fn init_repo(git_exe: &str, repo_base: &Path) -> Result<()> {
10 git_io(git_exe, repo_base, &["init"])
11}
12
13pub fn add_and_commit(git_exe: &str, repo_base: &Path, commit_msg: &str) -> Result<()> {
14 git_io(git_exe, repo_base, &["add", "-A"])?;
15 git_io(git_exe, repo_base, &["commit", "-m", commit_msg])
16}