diff options
author | Anthony HAMON <anthony.hamon@iadvize.com> | 2018-08-21 22:33:25 +0200 |
---|---|---|
committer | Anthony HAMON <anthony.hamon@iadvize.com> | 2018-08-26 01:58:19 +0200 |
commit | 364c1ac5e75867bd0f016c01ebc8e52bcbf2ce63 (patch) | |
tree | b8983294fa767191ae5179caa85c11c4ceedf520 /pkg/gui/files_panel.go | |
parent | 883fcf10838879839386091e6375c42b3f0b6a7d (diff) |
remove useless returned variable
Diffstat (limited to 'pkg/gui/files_panel.go')
-rw-r--r-- | pkg/gui/files_panel.go | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go index 2f5db9aff..eb1fff94d 100644 --- a/pkg/gui/files_panel.go +++ b/pkg/gui/files_panel.go @@ -85,11 +85,8 @@ func (gui *Gui) handleAddPatch(g *gocui.Gui, v *gocui.View) error { if !file.Tracked { return gui.createErrorPanel(g, gui.Tr.SLocalize("CannotGitAdd")) } - sub, err := gui.GitCommand.AddPatch(file.Name) - if err != nil { - return err - } - gui.SubProcess = sub + + gui.SubProcess = gui.GitCommand.AddPatch(file.Name) return gui.Errors.ErrSubProcess } @@ -218,16 +215,11 @@ func (gui *Gui) handleCommitEditorPress(g *gocui.Gui, filesView *gocui.View) err } // PrepareSubProcess - prepare a subprocess for execution and tell the gui to switch to it -func (gui *Gui) PrepareSubProcess(g *gocui.Gui, commands ...string) error { - sub, err := gui.GitCommand.PrepareCommitSubProcess() - if err != nil { - return err - } - gui.SubProcess = sub +func (gui *Gui) PrepareSubProcess(g *gocui.Gui, commands ...string) { + gui.SubProcess = gui.GitCommand.PrepareCommitSubProcess() g.Update(func(g *gocui.Gui) error { return gui.Errors.ErrSubProcess }) - return nil } func (gui *Gui) genericFileOpen(g *gocui.Gui, v *gocui.View, filename string, open func(string) (*exec.Cmd, error)) error { |