1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

more cherry picking stuff, mostly around the reflog

This commit is contained in:
Jesse Duffield
2020-08-22 11:57:44 +10:00
parent c2b154acad
commit 442f6cd854
5 changed files with 67 additions and 21 deletions

View File

@ -815,7 +815,7 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
ViewName: "commits",
Contexts: []string{BRANCH_COMMITS_CONTEXT_KEY},
Key: gui.getKey("commits.resetCherryPick"),
Handler: gui.handleResetCherryPick,
Handler: gui.wrappedHandler(gui.exitCherryPickingMode),
Description: gui.Tr.SLocalize("resetCherryPick"),
},
{
@ -839,6 +839,27 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
Handler: gui.handleCreateReflogResetMenu,
Description: gui.Tr.SLocalize("viewResetOptions"),
},
{
ViewName: "commits",
Contexts: []string{REFLOG_COMMITS_CONTEXT_KEY},
Key: gui.getKey("commits.cherryPickCopy"),
Handler: gui.wrappedHandler(gui.handleCopyCommit),
Description: gui.Tr.SLocalize("cherryPickCopy"),
},
{
ViewName: "commits",
Contexts: []string{REFLOG_COMMITS_CONTEXT_KEY},
Key: gui.getKey("commits.cherryPickCopyRange"),
Handler: gui.wrappedHandler(gui.handleCopyCommitRange),
Description: gui.Tr.SLocalize("cherryPickCopyRange"),
},
{
ViewName: "commits",
Contexts: []string{REFLOG_COMMITS_CONTEXT_KEY},
Key: gui.getKey("commits.resetCherryPick"),
Handler: gui.wrappedHandler(gui.exitCherryPickingMode),
Description: gui.Tr.SLocalize("resetCherryPick"),
},
{
ViewName: "branches",
Contexts: []string{SUB_COMMITS_CONTEXT_KEY},
@ -874,6 +895,20 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
Handler: gui.wrappedHandler(gui.handleCopyCommit),
Description: gui.Tr.SLocalize("cherryPickCopy"),
},
{
ViewName: "branches",
Contexts: []string{SUB_COMMITS_CONTEXT_KEY},
Key: gui.getKey("commits.cherryPickCopyRange"),
Handler: gui.wrappedHandler(gui.handleCopyCommitRange),
Description: gui.Tr.SLocalize("cherryPickCopyRange"),
},
{
ViewName: "branches",
Contexts: []string{SUB_COMMITS_CONTEXT_KEY},
Key: gui.getKey("commits.resetCherryPick"),
Handler: gui.wrappedHandler(gui.exitCherryPickingMode),
Description: gui.Tr.SLocalize("resetCherryPick"),
},
{
ViewName: "stash",
Key: gui.getKey("universal.goInto"),