New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Merge keybind in tag submenu, closes #1315 #3383
base: master
Are you sure you want to change the base?
Changes from 3 commits
6405912
a1dddda
13482f7
2568944
91a620c
f6a2423
97fefc2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,13 @@ func (self *TagsController) GetKeybindings(opts types.KeybindingsOpts) []*types. | |
DisplayOnScreen: true, | ||
OpensMenu: true, | ||
}, | ||
{ | ||
Key: opts.GetKey(opts.Config.Branches.MergeIntoCurrentBranch), | ||
Handler: opts.Guards.OutsideFilterMode(self.withItem(self.merge)), | ||
Description: self.c.Tr.Merge, | ||
Tooltip: self.c.Tr.MergeBranchTooltip, | ||
DisplayOnScreen: true, | ||
}, | ||
} | ||
|
||
return bindings | ||
|
@@ -236,6 +243,10 @@ func (self *TagsController) create() error { | |
}) | ||
} | ||
|
||
func (self *TagsController) merge(tag *models.Tag) error { | ||
return self.c.Helpers().MergeAndRebase.MergeRefIntoCheckedOutBranch(tag.RefName()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should focus the local branches view after merging so that the user has more context on what's going on. Let me know if you need help with that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added this in f6a2423, let me know if it's preferred to squash down these commits. |
||
} | ||
|
||
func (self *TagsController) context() *context.TagsContext { | ||
return self.c.Contexts().Tags | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a new tooltip called MergeTagTooltip because the current tooltip only mentions branches
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, I'll work on this when I get some free time along with the other comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this in 91a620c, let me know if I should squash these down.