diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rs index 6cde10bdfb..c08e05f119 100644 --- a/crates/git_ui/src/git_panel.rs +++ b/crates/git_ui/src/git_panel.rs @@ -737,7 +737,7 @@ impl GitPanel { } fn fill_co_authors(&mut self, _: &FillCoAuthors, cx: &mut ViewContext) { - const CO_AUTHOR_PREFIX: &str = "co-authored-by: "; + const CO_AUTHOR_PREFIX: &str = "Co-authored-by: "; let Some(room) = self .workspace @@ -749,12 +749,13 @@ impl GitPanel { let mut existing_text = self.commit_editor.read(cx).text(cx); existing_text.make_ascii_lowercase(); + let lowercase_co_author_prefix = CO_AUTHOR_PREFIX.to_lowercase(); let mut ends_with_co_authors = false; let existing_co_authors = existing_text .lines() .filter_map(|line| { let line = line.trim(); - if line.starts_with(CO_AUTHOR_PREFIX) { + if line.starts_with(&lowercase_co_author_prefix) { ends_with_co_authors = true; Some(line) } else {