diff --git a/gitbutler-app/src/virtual_branches/virtual.rs b/gitbutler-app/src/virtual_branches/virtual.rs index 2127a83b3..b6e58a4d4 100644 --- a/gitbutler-app/src/virtual_branches/virtual.rs +++ b/gitbutler-app/src/virtual_branches/virtual.rs @@ -156,8 +156,7 @@ impl From> for Author { pub fn normalize_branch_name(name: &str) -> String { // Technically this pattern should include ".", but it makes libgit2 throws an error let pattern = Regex::new("[^A-Za-z0-9_/]+").unwrap(); - let replaced_name = pattern.replace_all(name, "-").to_string(); - replaced_name.to_lowercase() + pattern.replace_all(name, "-").to_string() } pub fn get_default_target( diff --git a/gitbutler-app/tests/virtual_branches.rs b/gitbutler-app/tests/virtual_branches.rs index 917241be1..ac8212dad 100644 --- a/gitbutler-app/tests/virtual_branches.rs +++ b/gitbutler-app/tests/virtual_branches.rs @@ -335,7 +335,7 @@ mod references { .into_iter() .filter_map(|reference| reference.name().map(|name| name.to_string())) .collect::>(); - assert!(refnames.contains(&"refs/gitbutler/virtual-branch".to_string())); + assert!(refnames.contains(&"refs/gitbutler/Virtual-branch".to_string())); } #[tokio::test]