when choosing upstream branch name, ignore case

This commit is contained in:
Nikita Galaiko 2023-10-24 12:46:59 +02:00 committed by GitButler
parent 48b16b8881
commit 7c56f41ab1

View File

@ -2147,9 +2147,17 @@ pub fn push(
let existing_branches = remote_branches
.iter()
.map(RemoteBranchName::branch)
.map(str::to_lowercase) // git is weird about case sensitivity here, assume not case sensitive
.collect::<Vec<_>>();
remote_branch.with_branch(&dedup_fmt(&existing_branches, remote_branch.branch(), "-"))
remote_branch.with_branch(&dedup_fmt(
&existing_branches
.iter()
.map(String::as_str)
.collect::<Vec<_>>(),
remote_branch.branch(),
"-",
))
};
project_repository.push(&vbranch.head, &remote_branch, with_force, credentials)?;