summaryrefslogtreecommitdiffstats
path: root/pkg/gui/controllers/branches_controller.go
diff options
context:
space:
mode:
authorRyooooooga <eial5q265e5@gmail.com>2022-10-16 21:31:42 +0900
committerJesse Duffield <jessedduffield@gmail.com>2022-11-14 19:05:07 +1100
commit52a2e4c1dc270c95366d05687de514caed95f695 (patch)
tree3c0d5d086da0a365c8429166a903874f6c5aaf2f /pkg/gui/controllers/branches_controller.go
parentb33ec5a05025a2755f4511f042e9e0fcb224bf47 (diff)
fix: fix ambiguous branch name
test: add an integration test for checkout branch by name fix: fix full ref name of detached head refactor: refactor current branch loader chore: use field name explicitly
Diffstat (limited to 'pkg/gui/controllers/branches_controller.go')
-rw-r--r--pkg/gui/controllers/branches_controller.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/gui/controllers/branches_controller.go b/pkg/gui/controllers/branches_controller.go
index b049a0a0b..9222492d7 100644
--- a/pkg/gui/controllers/branches_controller.go
+++ b/pkg/gui/controllers/branches_controller.go
@@ -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 {