mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-01 00:54:58 +02:00
clean as well as reset (I'm hoping this is a good design decision)
This commit is contained in:
@ -433,9 +433,9 @@ func (gui *Gui) handleAbortMerge(g *gocui.Gui, v *gocui.View) error {
|
||||
return gui.refreshFiles(g)
|
||||
}
|
||||
|
||||
func (gui *Gui) handleResetHard(g *gocui.Gui, v *gocui.View) error {
|
||||
func (gui *Gui) handleResetAndClean(g *gocui.Gui, v *gocui.View) error {
|
||||
return gui.createConfirmationPanel(g, v, gui.Tr.SLocalize("ClearFilePanel"), gui.Tr.SLocalize("SureResetHardHead"), func(g *gocui.Gui, v *gocui.View) error {
|
||||
if err := gui.GitCommand.ResetHard(); err != nil {
|
||||
if err := gui.GitCommand.ResetAndClean(); err != nil {
|
||||
gui.createErrorPanel(g, err.Error())
|
||||
}
|
||||
return gui.refreshFiles(g)
|
||||
|
@ -210,7 +210,7 @@ func (gui *Gui) GetKeybindings() []*Binding {
|
||||
ViewName: "files",
|
||||
Key: 'D',
|
||||
Modifier: gocui.ModNone,
|
||||
Handler: gui.handleResetHard,
|
||||
Handler: gui.handleResetAndClean,
|
||||
Description: gui.Tr.SLocalize("resetHard"),
|
||||
}, {
|
||||
ViewName: "files",
|
||||
|
Reference in New Issue
Block a user