diff --git a/src/commit.rs b/src/commit.rs index 2ca56a467c6d3d82c57490bf90dbee3e2543a549..bf677feeafd85aa6bd8d3b0971cfc6a2c5c2f820 100644 --- a/src/commit.rs +++ b/src/commit.rs @@ -37,9 +37,11 @@ pub fn get_current_commit() -> String { } /// 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 commit = get_current_commit(); + if commit == String::from("") { + commit = get_current_commit(); + } let output = Command::new("borg") .arg("create") .arg("--stats")