mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 21:05:48 +02:00
commands/git : remove dependency on gocui
This commit is contained in:
parent
5c204b2813
commit
d23577168f
2 changed files with 3 additions and 4 deletions
|
@ -7,7 +7,6 @@ import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/jesseduffield/gocui"
|
|
||||||
"github.com/jesseduffield/lazygit/pkg/i18n"
|
"github.com/jesseduffield/lazygit/pkg/i18n"
|
||||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
@ -290,8 +289,8 @@ func (c *GitCommand) usingGpg() bool {
|
||||||
return value == "true" || value == "1" || value == "yes" || value == "on"
|
return value == "true" || value == "1" || value == "yes" || value == "on"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit commit to git
|
// Commit commits to git
|
||||||
func (c *GitCommand) Commit(g *gocui.Gui, message string) (*exec.Cmd, error) {
|
func (c *GitCommand) Commit(message string) (*exec.Cmd, error) {
|
||||||
command := "git commit -m " + c.OSCommand.Quote(message)
|
command := "git commit -m " + c.OSCommand.Quote(message)
|
||||||
if c.usingGpg() {
|
if c.usingGpg() {
|
||||||
return c.OSCommand.PrepareSubProcess(c.OSCommand.Platform.shell, c.OSCommand.Platform.shellArg, command), nil
|
return c.OSCommand.PrepareSubProcess(c.OSCommand.Platform.shell, c.OSCommand.Platform.shellArg, command), nil
|
||||||
|
|
|
@ -12,7 +12,7 @@ func (gui *Gui) handleCommitConfirm(g *gocui.Gui, v *gocui.View) error {
|
||||||
if message == "" {
|
if message == "" {
|
||||||
return gui.createErrorPanel(g, gui.Tr.SLocalize("CommitWithoutMessageErr"))
|
return gui.createErrorPanel(g, gui.Tr.SLocalize("CommitWithoutMessageErr"))
|
||||||
}
|
}
|
||||||
sub, err := gui.GitCommand.Commit(g, message)
|
sub, err := gui.GitCommand.Commit(message)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// TODO need to find a way to send through this error
|
// TODO need to find a way to send through this error
|
||||||
if err != gui.Errors.ErrSubProcess {
|
if err != gui.Errors.ErrSubProcess {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue