diff options
author | Ryooooooga <eial5q265e5@gmail.com> | 2023-02-08 22:40:18 +0900 |
---|---|---|
committer | Ryooooooga <eial5q265e5@gmail.com> | 2023-02-19 23:31:46 +0900 |
commit | 67b08ac2395b350779f5fc72d75bd7180f7da394 (patch) | |
tree | c419dfa156fd08e96fa069990af28f8b6e495211 /pkg/gui/controllers/branches_controller.go | |
parent | b54b8ae746a008daa7e7006094c9a533a88eff1d (diff) |
feat: support to create tag on branch
Diffstat (limited to 'pkg/gui/controllers/branches_controller.go')
-rw-r--r-- | pkg/gui/controllers/branches_controller.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/gui/controllers/branches_controller.go b/pkg/gui/controllers/branches_controller.go index 9222492d7..d5564ec95 100644 --- a/pkg/gui/controllers/branches_controller.go +++ b/pkg/gui/controllers/branches_controller.go @@ -87,6 +87,11 @@ func (self *BranchesController) GetKeybindings(opts types.KeybindingsOpts) []*ty Description: self.c.Tr.FastForward, }, { + Key: opts.GetKey(opts.Config.Branches.CreateTag), + Handler: self.checkSelected(self.createTag), + Description: self.c.Tr.LcCreateTag, + }, + { Key: opts.GetKey(opts.Config.Commits.ViewResetOptions), Handler: self.checkSelected(self.createResetMenu), Description: self.c.Tr.LcViewResetOptions, @@ -363,6 +368,10 @@ func (self *BranchesController) fastForward(branch *models.Branch) error { }) } +func (self *BranchesController) createTag(branch *models.Branch) error { + return self.helpers.Tags.CreateTagMenu(branch.FullRefName(), func() {}) +} + func (self *BranchesController) createResetMenu(selectedBranch *models.Branch) error { return self.helpers.Refs.CreateGitResetMenu(selectedBranch.Name) } |