Skip to content
Snippets Groups Projects
Commit 68533ac0 authored by nfontrod's avatar nfontrod
Browse files

src/commit.rs: change commit variable name to commit_id

parent 5c787d75
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment