Merge pull request #2224 from Ryooooooga/ambiguous-branch

This commit is contained in:
Jesse Duffield
2022-11-14 19:09:37 +11:00
committed by GitHub
39 changed files with 150 additions and 43 deletions

View File

@@ -255,7 +255,7 @@ func (self *BranchesController) createNewBranchWithName(newBranchName string) er
return nil
}
if err := self.git.Branch.New(newBranchName, branch.Name); err != nil {
if err := self.git.Branch.New(newBranchName, branch.FullRefName()); err != nil {
return self.c.Error(err)
}
@@ -411,7 +411,7 @@ func (self *BranchesController) rename(branch *models.Branch) error {
}
func (self *BranchesController) newBranch(selectedBranch *models.Branch) error {
return self.helpers.Refs.NewBranch(selectedBranch.RefName(), selectedBranch.RefName(), "")
return self.helpers.Refs.NewBranch(selectedBranch.FullRefName(), selectedBranch.RefName(), "")
}
func (self *BranchesController) createPullRequestMenu(selectedBranch *models.Branch, checkedOutBranch *models.Branch) error {

View File

@@ -29,7 +29,7 @@ var remoteIcons = []remoteIcon{
}
func IconForBranch(branch *models.Branch) string {
if branch.DisplayName != "" {
if branch.DetachedHead {
return DETACHED_HEAD_ICON
}
return BRANCH_ICON