diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-27 20:57:50 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-27 20:57:50 +1000 |
commit | b4323c029f2a5cc694294195e3f59c5ab4bccea0 (patch) | |
tree | 2a194879c325c4872d53caf2f4627da4028b804b /pkg/commands/git.go | |
parent | 60422912c8d41628c5ed1b4dd9432694c1be9199 (diff) | |
parent | 203ad29349ffa5d935db5d0d320b758a4be7e4b8 (diff) |
Merge branch 'master' into feature/add-all
Diffstat (limited to 'pkg/commands/git.go')
-rw-r--r-- | pkg/commands/git.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go index ab4cebf87..235809753 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -16,14 +16,14 @@ import ( // 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, @@ -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) } @@ -401,12 +401,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") } |