From 68533ac035248dbf91f60799e75b0cc2672ce303 Mon Sep 17 00:00:00 2001
From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr>
Date: Wed, 11 May 2022 11:32:17 +0200
Subject: [PATCH] src/commit.rs: change commit variable name to commit_id

---
 src/commit.rs | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/commit.rs b/src/commit.rs
index 3af86bb..6682fb6 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();
-- 
GitLab