merge_tools: use left_file_mode in make_diff_files

The `scm-record` library comments say that the `file_mode` is:
> The Unix file mode of the file (before any changes), if available.

This reverts commit ffd6884 and fixes #2591 and #2548.
This commit is contained in:
Łukasz Kurowski 2023-11-18 04:41:28 +01:00 committed by Łukasz Kurowski
parent 0357915778
commit e21ffb0139

View file

@ -350,7 +350,7 @@ pub fn make_diff_files(
files.push(scm_record::File {
old_path: None,
path: Cow::Owned(changed_path.to_fs_path(Path::new(""))),
file_mode: Some(right_file_mode),
file_mode: Some(left_file_mode),
sections,
});
}
@ -654,7 +654,7 @@ mod tests {
path: "added",
file_mode: Some(
FileMode(
33188,
0,
),
),
sections: [