1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

Check if there is any commit to amend and use 'A' instead of 'M' as shortcut.

This commit is contained in:
Kristijan Husak
2018-10-08 21:19:45 +02:00
parent ac65586bd5
commit 190309e5c1
6 changed files with 18 additions and 4 deletions

View File

@ -317,9 +317,9 @@ func (c *GitCommand) usingGpg() bool {
func (c *GitCommand) Commit(message string, amend bool) (*exec.Cmd, error) {
amendParam := ""
if amend {
amendParam = "--amend "
amendParam = "--amend"
}
command := fmt.Sprintf("git commit %s-m %s", amendParam, c.OSCommand.Quote(message))
command := fmt.Sprintf("git commit %s -m %s", amendParam, c.OSCommand.Quote(message))
if c.usingGpg() {
return c.OSCommand.PrepareSubProcess(c.OSCommand.Platform.shell, c.OSCommand.Platform.shellArg, command), nil
}