fix<CreateBranch>: fix branch name validation

This commit is contained in:
leo 2021-05-26 17:21:42 +08:00
parent 04f1137f96
commit 001453d6ff
2 changed files with 10 additions and 5 deletions

View file

@ -16,7 +16,8 @@ namespace SourceGit.Views.Validations {
name = Prefix + name;
foreach (var t in Repo.Branches) {
if (t.Name == name) {
var check = t.IsLocal ? t.Name : $"{t.Remote}/{t.Name}";
if (check == name) {
return new ValidationResult(false, App.Text("DuplicatedBranchName"));
}
}