1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-17 21:18:31 +02:00

add reset to upstream option on files panel

This commit is contained in:
Jesse Duffield 2020-02-16 09:21:23 +11:00
parent 0fe9c15ce8
commit feaf98bd01
2 changed files with 11 additions and 0 deletions

View File

@ -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 {
return gui.handleStashSave(gui.GitCommand.StashSave)
}
func (gui *Gui) handleCreateResetToUpstreamMenu(g *gocui.Gui, v *gocui.View) error {
return gui.createResetMenu("@{upstream}")
}

View File

@ -457,6 +457,13 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
Handler: gui.handleCustomCommand,
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",
Contexts: []string{"local-branches"},