From 364c1ac5e75867bd0f016c01ebc8e52bcbf2ce63 Mon Sep 17 00:00:00 2001 From: Anthony HAMON Date: Tue, 21 Aug 2018 22:33:25 +0200 Subject: remove useless returned variable --- pkg/commands/git.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/commands/git.go') diff --git a/pkg/commands/git.go b/pkg/commands/git.go index 14f3a433a..ec257c441 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -265,7 +265,7 @@ func (c *GitCommand) UsingGpg() bool { func (c *GitCommand) Commit(g *gocui.Gui, 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) + return c.OSCommand.PrepareSubProcess(c.OSCommand.Platform.shell, c.OSCommand.Platform.shellArg, command), nil } return nil, c.OSCommand.RunCommand(command) } @@ -391,12 +391,12 @@ func (c *GitCommand) Checkout(branch string, force bool) error { // AddPatch prepares a subprocess for adding a patch by patch // this will eventually be swapped out for a better solution inside the Gui -func (c *GitCommand) AddPatch(filename string) (*exec.Cmd, error) { +func (c *GitCommand) AddPatch(filename string) *exec.Cmd { return c.OSCommand.PrepareSubProcess("git", "add", "--patch", filename) } // PrepareCommitSubProcess prepares a subprocess for `git commit` -func (c *GitCommand) PrepareCommitSubProcess() (*exec.Cmd, error) { +func (c *GitCommand) PrepareCommitSubProcess() *exec.Cmd { return c.OSCommand.PrepareSubProcess("git", "commit") } -- cgit v1.2.3 From f6ab11e4ee1bf0e90b94af28fb16a74ef10e0ae0 Mon Sep 17 00:00:00 2001 From: Anthony HAMON Date: Sun, 26 Aug 2018 02:20:01 +0200 Subject: run gofmt --- pkg/commands/git.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/commands/git.go') diff --git a/pkg/commands/git.go b/pkg/commands/git.go index ec257c441..e5ee5dbfa 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -7,9 +7,9 @@ import ( "os/exec" "strings" - "github.com/sirupsen/logrus" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/utils" + "github.com/sirupsen/logrus" gitconfig "github.com/tcnksm/go-gitconfig" gogit "gopkg.in/src-d/go-git.v4" ) -- cgit v1.2.3 From 540edc0c35e97393d9a01c927f7ac962bcbf6d37 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 26 Aug 2018 15:46:18 +1000 Subject: anonymous reporting data --- pkg/commands/git.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/commands/git.go') diff --git a/pkg/commands/git.go b/pkg/commands/git.go index 14f3a433a..75de1fc70 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -7,23 +7,23 @@ import ( "os/exec" "strings" - "github.com/sirupsen/logrus" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/utils" + "github.com/sirupsen/logrus" gitconfig "github.com/tcnksm/go-gitconfig" gogit "gopkg.in/src-d/go-git.v4" ) // GitCommand is our main git interface type GitCommand struct { - Log *logrus.Logger + Log *logrus.Entry OSCommand *OSCommand Worktree *gogit.Worktree Repo *gogit.Repository } // NewGitCommand it runs git commands -func NewGitCommand(log *logrus.Logger, osCommand *OSCommand) (*GitCommand, error) { +func NewGitCommand(log *logrus.Entry, osCommand *OSCommand) (*GitCommand, error) { gitCommand := &GitCommand{ Log: log, OSCommand: osCommand, -- cgit v1.2.3