mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-13 01:30:53 +02:00
add common commit controller
This commit is contained in:
@ -28,11 +28,6 @@ func NewReflogController(
|
||||
|
||||
func (self *ReflogController) GetKeybindings(opts types.KeybindingsOpts) []*types.Binding {
|
||||
bindings := []*types.Binding{
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.GoInto),
|
||||
Handler: self.checkSelected(self.enter),
|
||||
Description: self.c.Tr.LcViewCommitFiles,
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Universal.Select),
|
||||
Handler: self.checkSelected(self.checkout),
|
||||
@ -103,14 +98,6 @@ func (self *ReflogController) openResetMenu(commit *models.Commit) error {
|
||||
return self.helpers.Refs.CreateGitResetMenu(commit.Sha)
|
||||
}
|
||||
|
||||
func (self *ReflogController) enter(commit *models.Commit) error {
|
||||
return self.switchToCommitFilesContext(SwitchToCommitFilesContextOpts{
|
||||
RefName: commit.Sha,
|
||||
CanRebase: false,
|
||||
Context: self.context(),
|
||||
})
|
||||
}
|
||||
|
||||
func (self *ReflogController) copy(commit *models.Commit) error {
|
||||
return self.helpers.CherryPick.Copy(commit, self.model.FilteredReflogCommits, self.context())
|
||||
}
|
||||
|
Reference in New Issue
Block a user