Skip to content
Snippets Groups Projects
Commit 67361b25 authored by nicolas's avatar nicolas
Browse files

src/diff.rs: add parameter prepare_checkout to is_diff function

parent 4c68997f
No related branches found
No related tags found
No related merge requests found
...@@ -5,13 +5,13 @@ pub fn compute_diff(commit1: &str, commit2: &Option<String>) { ...@@ -5,13 +5,13 @@ pub fn compute_diff(commit1: &str, commit2: &Option<String>) {
let (borg_path, _) = commit::check_path(); let (borg_path, _) = commit::check_path();
match commit2 { match commit2 {
Some(c2) => { Some(c2) => {
checkout::is_diff(commit1, c2, &borg_path); checkout::is_diff(commit1, c2, &borg_path, false);
} }
None => { None => {
// Create an archive with the content of the current commit // Create an archive with the content of the current commit
let tmp_name = format!("{}-tmp", commit1); let tmp_name = format!("{}-tmp", commit1);
checkout::silent_commit(String::from("none"), tmp_name.clone(), false); checkout::silent_commit(String::from("none"), tmp_name.clone(), false);
checkout::is_diff(&commit1, &tmp_name, &borg_path); checkout::is_diff(&commit1, &tmp_name, &borg_path, false);
commit::delete_commit(&tmp_name, &borg_path); commit::delete_commit(&tmp_name, &borg_path);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment