From e21ffb01390fed3edc21aac591796cd10b046324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Kurowski?= Date: Sat, 18 Nov 2023 04:41:28 +0100 Subject: [PATCH] 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. --- cli/src/merge_tools/builtin.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/merge_tools/builtin.rs b/cli/src/merge_tools/builtin.rs index 4960962e04..f78761a40e 100644 --- a/cli/src/merge_tools/builtin.rs +++ b/cli/src/merge_tools/builtin.rs @@ -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: [