fix: bug - rename local branch name should only check names with other local branches

This commit is contained in:
leo 2024-04-26 14:25:14 +08:00
parent 49abab2903
commit ea1d0bf6a2

View file

@ -34,7 +34,7 @@ namespace SourceGit.ViewModels
{ {
foreach (var b in rename._repo.Branches) foreach (var b in rename._repo.Branches)
{ {
if (b != rename.Target && b.Name == name) if (b.IsLocal && b != rename.Target && b.Name == name)
{ {
return new ValidationResult("A branch with same name already exists!!!"); return new ValidationResult("A branch with same name already exists!!!");
} }