feature: prefer same name if new branch is created based on a remote branch

This commit is contained in:
leo 2024-03-08 18:01:29 +08:00
parent fc0ac109d8
commit 2ec46c9da0

View file

@ -30,6 +30,10 @@ namespace SourceGit.ViewModels {
_repo = repo;
_baseOnRevision = branch.FullName;
if (!branch.IsLocal && repo.Branches.Find(x => x.IsLocal && x.Name == branch.Name) == null) {
Name = branch.Name;
}
BasedOn = branch;
View = new Views.CreateBranch() { DataContext = this };
}