Skip to main content

semver_common/tools/git/
commit_all.rs

1use crate::{Alert, run_command};
2use r_log::Logger;
3
4/// Stages all changes in git and commits those changes with a supplied message.
5pub fn commit_all(message: &str, logger: &Logger) -> Result<(), Alert> {
6    run_command("git", ["add", "."], Some(logger))?;
7    run_command("git", ["commit", "-m", message], Some(logger))?;
8    Ok(())
9}