From d23577168f46f249e2af629ed23f15ddfd2cef6a Mon Sep 17 00:00:00 2001 From: Anthony HAMON Date: Mon, 10 Sep 2018 22:01:52 +0200 Subject: [PATCH] commands/git : remove dependency on gocui --- pkg/commands/git.go | 5 ++--- pkg/gui/commit_message_panel.go | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/commands/git.go b/pkg/commands/git.go index 2945e1e92..18f698e30 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -7,7 +7,6 @@ import ( "os/exec" "strings" - "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/i18n" "github.com/jesseduffield/lazygit/pkg/utils" "github.com/sirupsen/logrus" @@ -290,8 +289,8 @@ func (c *GitCommand) usingGpg() bool { return value == "true" || value == "1" || value == "yes" || value == "on" } -// Commit commit to git -func (c *GitCommand) Commit(g *gocui.Gui, message string) (*exec.Cmd, error) { +// Commit commits to git +func (c *GitCommand) Commit(message string) (*exec.Cmd, error) { command := "git commit -m " + c.OSCommand.Quote(message) if c.usingGpg() { return c.OSCommand.PrepareSubProcess(c.OSCommand.Platform.shell, c.OSCommand.Platform.shellArg, command), nil diff --git a/pkg/gui/commit_message_panel.go b/pkg/gui/commit_message_panel.go index 99d649102..e23c47da0 100644 --- a/pkg/gui/commit_message_panel.go +++ b/pkg/gui/commit_message_panel.go @@ -12,7 +12,7 @@ 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(g, message) + sub, err := gui.GitCommand.Commit(message) if err != nil { // TODO need to find a way to send through this error if err != gui.Errors.ErrSubProcess {