1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

Add ammend commit action.

This commit is contained in:
Kristijan Husak
2018-09-12 15:20:35 +02:00
parent 7fb2cafd0c
commit 61f0801bd3
7 changed files with 51 additions and 3 deletions

View File

@ -12,7 +12,8 @@ func (gui *Gui) handleCommitConfirm(g *gocui.Gui, v *gocui.View) error {
if message == "" {
return gui.createErrorPanel(g, gui.Tr.SLocalize("CommitWithoutMessageErr"))
}
sub, err := gui.GitCommand.Commit(message)
amendCommit := v.Title == gui.Tr.SLocalize("AmendLastCommit")
sub, err := gui.GitCommand.Commit(message, amendCommit)
if err != nil {
// TODO need to find a way to send through this error
if err != gui.Errors.ErrSubProcess {