summaryrefslogtreecommitdiffstats
path: root/src/handlers/diff_header.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/handlers/diff_header.rs')
-rw-r--r--src/handlers/diff_header.rs20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/handlers/diff_header.rs b/src/handlers/diff_header.rs
index 1a703393..f90c6538 100644
--- a/src/handlers/diff_header.rs
+++ b/src/handlers/diff_header.rs
@@ -334,11 +334,23 @@ pub fn get_file_change_description_from_file_paths(
) if minus_file == plus_file => match (old_mode.as_str(), new_mode.as_str()) {
// 100755 for executable and 100644 for non-executable are the only file modes Git records.
// https://medium.com/@tahteche/how-git-treats-changes-in-file-permissions-f71874ca239d
- ("100644", "100755") => format!("{}: mode +x", plus_file),
- ("100755", "100644") => format!("{}: mode -x", plus_file),
+ ("100644", "100755") => format!(
+ "{}{}: mode +x",
+ format_label(&config.file_modified_label),
+ format_file(plus_file)
+ ),
+ ("100755", "100644") => format!(
+ "{}{}: mode -x",
+ format_label(&config.file_modified_label),
+ format_file(plus_file)
+ ),
_ => format!(
- "{}: {} {} {}",
- plus_file, old_mode, config.right_arrow, new_mode
+ "{}{}: {} {} {}",
+ format_label(&config.file_modified_label),
+ format_file(plus_file),
+ old_mode,
+ config.right_arrow,
+ new_mode
),
},
(minus_file, plus_file, _, _) if minus_file == plus_file => format!(