1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-09-16 09:16:26 +02:00

work towards more interactive rebase options

This commit is contained in:
Jesse Duffield
2019-02-19 23:36:29 +11:00
parent 935f774834
commit 0228e25084
9 changed files with 263 additions and 201 deletions

View File

@@ -480,3 +480,16 @@ func (gui *Gui) anyFilesWithMergeConflicts() bool {
}
return false
}
func (gui *Gui) handleSoftReset(g *gocui.Gui, v *gocui.View) error {
return gui.createConfirmationPanel(g, v, gui.Tr.SLocalize("SoftReset"), gui.Tr.SLocalize("ConfirmSoftReset"), func(g *gocui.Gui, v *gocui.View) error {
if err := gui.GitCommand.SoftReset("HEAD^"); err != nil {
return gui.createErrorPanel(g, err.Error())
}
if err := gui.refreshCommits(gui.g); err != nil {
return err
}
return gui.refreshFiles()
}, nil)
}