diff --git a/src/commit.rs b/src/commit.rs index 3af86bb103f939aaebedc0b257adecce26f4a869..6682fb66d44059c808321aa2e2f052713a283694 100644 --- a/src/commit.rs +++ b/src/commit.rs @@ -56,13 +56,13 @@ pub fn delete_commit(commit: &str, borg_path: &PathBuf) { /// Create a commit of the results folder named as the current git commit id -pub fn commit(compression: String, mut commit: String, update: bool) { +pub fn commit(compression: String, mut commit_id: String, update: bool) { let (borg_folder, results_folder) = check_path(); - if commit == String::from("") { - commit = get_current_commit(); + if commit_id == String::from("") { + commit_id = get_current_commit(); } if update { - delete_commit(&commit, &borg_folder); + delete_commit(&commit_id, &borg_folder); } let output = Command::new("borg") .arg("create") @@ -70,7 +70,7 @@ pub fn commit(compression: String, mut commit: String, update: bool) { .arg("--progress") .arg("--compression") .arg(compression) - .arg(format!("{}::{}", borg_folder.to_str().unwrap(), commit)) + .arg(format!("{}::{}", borg_folder.to_str().unwrap(), commit_id)) .arg(results_folder.to_str().unwrap()) .output() .unwrap();