diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-12-05 20:06:47 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-12-05 20:06:47 +1100 |
commit | 3b51d7cd0026f0b4da13bf6ffcd4635b86c2a704 (patch) | |
tree | c55e7c91b001ce0de5a545bbf09b361c5c46308a /pkg/gui | |
parent | 66512ca253b73c173196080ea0929e49a521b379 (diff) |
clean as well as reset (I'm hoping this is a good design decision)
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/files_panel.go | 4 | ||||
-rw-r--r-- | pkg/gui/keybindings.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go index a16ef4909..5eb8f63f1 100644 --- a/pkg/gui/files_panel.go +++ b/pkg/gui/files_panel.go @@ -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) diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index 4158bedb7..1a63d009c 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -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", |