Skip to content

Commit

Permalink
merge_tools: use left_file_mode in make_diff_files
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
crackcomm committed Nov 19, 2023
1 parent 0357915 commit e21ffb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/src/merge_tools/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
}
Expand Down Expand Up @@ -654,7 +654,7 @@ mod tests {
path: "added",
file_mode: Some(
FileMode(
33188,
0,
),
),
sections: [
Expand Down

0 comments on commit e21ffb0

Please sign in to comment.