Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

git_graph: Fix pluralization of "Changed Files" in commit details (#54284)

galuis1167ca737fcf10f
diff --git a/crates/git_graph/src/git_graph.rs b/crates/git_graph/src/git_graph.rs
index 1d06ecb1c49..8f32887b035 100644
--- a/crates/git_graph/src/git_graph.rs
+++ b/crates/git_graph/src/git_graph.rs
@@ -2100,9 +2100,17 @@ impl GitGraph {
.w_full()
.justify_between()
.child(
- Label::new(format!("{} Changed Files", changed_files_count))
- .size(LabelSize::Small)
- .color(Color::Muted),
+ Label::new(format!(
+ "{} Changed {}",
+ changed_files_count,
+ if changed_files_count == 1 {
+ "File"
+ } else {
+ "Files"
+ }
+ ))
+ .size(LabelSize::Small)
+ .color(Color::Muted),
)
.child(DiffStat::new(
"commit-diff-stat",