mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
genericise creating new branches off things
This commit is contained in:
@ -496,7 +496,7 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
|
||||
ViewName: "branches",
|
||||
Contexts: []string{LOCAL_BRANCHES_CONTEXT_KEY},
|
||||
Key: gui.getKey("universal.new"),
|
||||
Handler: gui.handleNewBranch,
|
||||
Handler: gui.wrappedHandler(gui.handleNewBranchOffCurrentItem),
|
||||
Description: gui.Tr.SLocalize("newBranch"),
|
||||
},
|
||||
{
|
||||
@ -801,7 +801,7 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
|
||||
Contexts: []string{BRANCH_COMMITS_CONTEXT_KEY},
|
||||
Key: gui.getKey("universal.new"),
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: gui.wrappedHandler(gui.handleNewBranchOffCommit),
|
||||
Handler: gui.wrappedHandler(gui.handleNewBranchOffCurrentItem),
|
||||
Description: gui.Tr.SLocalize("createNewBranchFromCommit"),
|
||||
},
|
||||
{
|
||||
@ -860,6 +860,13 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
|
||||
Handler: gui.wrappedHandler(gui.handleCreateSubCommitResetMenu),
|
||||
Description: gui.Tr.SLocalize("viewResetOptions"),
|
||||
},
|
||||
{
|
||||
ViewName: "branches",
|
||||
Contexts: []string{SUB_COMMITS_CONTEXT_KEY},
|
||||
Key: gui.getKey("universal.new"),
|
||||
Handler: gui.wrappedHandler(gui.handleNewBranchOffCurrentItem),
|
||||
Description: gui.Tr.SLocalize("newBranch"),
|
||||
},
|
||||
{
|
||||
ViewName: "stash",
|
||||
Key: gui.getKey("universal.goInto"),
|
||||
@ -1358,10 +1365,9 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
|
||||
ViewName: "branches",
|
||||
Contexts: []string{REMOTE_BRANCHES_CONTEXT_KEY},
|
||||
Key: gui.getKey("universal.new"),
|
||||
Handler: gui.handleNewBranchOffRemote,
|
||||
Handler: gui.wrappedHandler(gui.handleNewBranchOffCurrentItem),
|
||||
Description: gui.Tr.SLocalize("newBranch"),
|
||||
},
|
||||
|
||||
{
|
||||
ViewName: "branches",
|
||||
Contexts: []string{REMOTE_BRANCHES_CONTEXT_KEY},
|
||||
|
Reference in New Issue
Block a user