mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-30 01:17:37 +03:00
chore: remove inappropriate to_lowercase() of branch names
This commit is contained in:
parent
8f027b9daf
commit
90c8884bbf
@ -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(
|
||||
|
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user