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

src/commit.rs: add a parameter commit to the commit function

parent 420f27bb
No related branches found
No related tags found
No related merge requests found
...@@ -37,9 +37,11 @@ pub fn get_current_commit() -> String { ...@@ -37,9 +37,11 @@ pub fn get_current_commit() -> String {
} }
/// Create a commit of the results folder named as the current git commit id /// Create a commit of the results folder named as the current git commit id
pub fn commit(compression: String) { pub fn commit(compression: String, mut commit: String) {
let (borg_folder, results_folder) = check_path(); let (borg_folder, results_folder) = check_path();
let commit = get_current_commit(); if commit == String::from("") {
commit = get_current_commit();
}
let output = Command::new("borg") let output = Command::new("borg")
.arg("create") .arg("create")
.arg("--stats") .arg("--stats")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment