summaryrefslogtreecommitdiffstats
path: root/pkg/gui/commit_message_panel.go
diff options
context:
space:
mode:
authorKristijan Husak <husakkristijan@gmail.com>2018-09-12 15:20:35 +0200
committerKristijan Husak <husakkristijan@gmail.com>2018-09-13 12:44:32 +0200
commit61f0801bd366e959437676ae72b2d9fe98c4b8af (patch)
tree083ef07b6c8f759c2432a6e4b53df940441abf6f /pkg/gui/commit_message_panel.go
parent7fb2cafd0cf6effbe660a933612d8c6783206749 (diff)
Add ammend commit action.
Diffstat (limited to 'pkg/gui/commit_message_panel.go')
-rw-r--r--pkg/gui/commit_message_panel.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/gui/commit_message_panel.go b/pkg/gui/commit_message_panel.go
index e23c47da0..2c3d086c7 100644
--- a/pkg/gui/commit_message_panel.go
+++ b/pkg/gui/commit_message_panel.go
@@ -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 {