mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-13 01:30:53 +02:00
add reset to upstream option on files panel
This commit is contained in:
@ -570,3 +570,7 @@ func (gui *Gui) handleCreateStashMenu(g *gocui.Gui, v *gocui.View) error {
|
|||||||
func (gui *Gui) handleStashChanges(g *gocui.Gui, v *gocui.View) error {
|
func (gui *Gui) handleStashChanges(g *gocui.Gui, v *gocui.View) error {
|
||||||
return gui.handleStashSave(gui.GitCommand.StashSave)
|
return gui.handleStashSave(gui.GitCommand.StashSave)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (gui *Gui) handleCreateResetToUpstreamMenu(g *gocui.Gui, v *gocui.View) error {
|
||||||
|
return gui.createResetMenu("@{upstream}")
|
||||||
|
}
|
||||||
|
@ -457,6 +457,13 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
|
|||||||
Handler: gui.handleCustomCommand,
|
Handler: gui.handleCustomCommand,
|
||||||
Description: gui.Tr.SLocalize("executeCustomCommand"),
|
Description: gui.Tr.SLocalize("executeCustomCommand"),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
ViewName: "files",
|
||||||
|
Key: gui.getKey("commits.viewResetOptions"),
|
||||||
|
Modifier: gocui.ModNone,
|
||||||
|
Handler: gui.handleCreateResetToUpstreamMenu,
|
||||||
|
Description: gui.Tr.SLocalize("resetToUpstream"),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
ViewName: "branches",
|
ViewName: "branches",
|
||||||
Contexts: []string{"local-branches"},
|
Contexts: []string{"local-branches"},
|
||||||
|
Reference in New Issue
Block a user