chore: remove inappropriate to_lowercase() of branch names

This commit is contained in:
Kiril Videlov 2024-02-13 23:40:29 +01:00 committed by Kiril Videlov
parent 8f027b9daf
commit 90c8884bbf
2 changed files with 2 additions and 3 deletions

View File

@ -156,8 +156,7 @@ impl From<git::Signature<'_>> 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(

View File

@ -335,7 +335,7 @@ mod references {
.into_iter()
.filter_map(|reference| reference.name().map(|name| name.to_string()))
.collect::<Vec<_>>();
assert!(refnames.contains(&"refs/gitbutler/virtual-branch".to_string()));
assert!(refnames.contains(&"refs/gitbutler/Virtual-branch".to_string()));
}
#[tokio::test]