mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
enhance: create branch on detached HEAD (#344)
This commit is contained in:
parent
c596427380
commit
ed2d3279e1
5 changed files with 5 additions and 5 deletions
|
@ -35,7 +35,7 @@ namespace SourceGit.ViewModels
|
|||
public CreateBranch(Repository repo, Models.Branch branch)
|
||||
{
|
||||
_repo = repo;
|
||||
_baseOnRevision = branch.FullName;
|
||||
_baseOnRevision = branch.IsDetachedHead ? branch.Head : branch.FullName;
|
||||
|
||||
if (!branch.IsLocal && repo.Branches.Find(x => x.IsLocal && x.Name == branch.Name) == null)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue