summaryrefslogtreecommitdiffstats
path: root/pkg/commands/commits.go
diff options
context:
space:
mode:
authorRyooooooga <ryoga_314@yahoo.co.jp>2021-03-01 23:16:48 +0900
committerJesse Duffield <jessedduffield@gmail.com>2021-03-13 10:49:40 +1100
commit50e4e9d58da73abbd0a80239d6917e6753ee78ae (patch)
tree5f5936f2362edcc5240dbe3dee3343b9756dd4b8 /pkg/commands/commits.go
parent03b9db5e0ad81fb38526dc7120358186c9e177f9 (diff)
fix command escaping
Diffstat (limited to 'pkg/commands/commits.go')
-rw-r--r--pkg/commands/commits.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/commands/commits.go b/pkg/commands/commits.go
index 4d14e1832..27005ebec 100644
--- a/pkg/commands/commits.go
+++ b/pkg/commands/commits.go
@@ -3,7 +3,6 @@ package commands
import (
"fmt"
"os/exec"
- "strconv"
"strings"
"github.com/jesseduffield/lazygit/pkg/commands/models"
@@ -25,7 +24,7 @@ func (c *GitCommand) Commit(message string, flags string) (*exec.Cmd, error) {
splitMessage := strings.Split(message, "\n")
lineArgs := ""
for _, line := range splitMessage {
- lineArgs += fmt.Sprintf(" -m %s", strconv.Quote(line))
+ lineArgs += fmt.Sprintf(" -m %s", c.OSCommand.Quote(line))
}
command := fmt.Sprintf("git commit %s%s", flags, lineArgs)