mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 12:55:47 +02:00
Fix tests and add test scenarios for amend.
This commit is contained in:
parent
190309e5c1
commit
4287f8ae90
3 changed files with 78 additions and 9 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue