diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-11 20:25:36 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-12 18:47:16 +1000 |
commit | 1b78a42b80098fa2376b33efb3e84a0da56b7ad9 (patch) | |
tree | d73d450eecc4c7bff33508e44d52a1828699ee1c /pkg/gui/global_handlers.go | |
parent | 79e73d2effc3232122e1faa3b84d6e3953dbd3c7 (diff) |
pass callback directly
Diffstat (limited to 'pkg/gui/global_handlers.go')
-rw-r--r-- | pkg/gui/global_handlers.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pkg/gui/global_handlers.go b/pkg/gui/global_handlers.go index d46e4ab75..4c9c5cf37 100644 --- a/pkg/gui/global_handlers.go +++ b/pkg/gui/global_handlers.go @@ -167,9 +167,7 @@ func (gui *Gui) handleInfoClick(g *gocui.Gui, v *gocui.View) error { } func (gui *Gui) fetch(g *gocui.Gui, v *gocui.View, canAskForCredentials bool) (err error) { - err = gui.GitCommand.Fetch(func(passOrUname string) string { - return gui.waitForPassUname(gui.g, v, passOrUname) - }, canAskForCredentials) + err = gui.GitCommand.Fetch(gui.waitForPassUname, canAskForCredentials) if canAskForCredentials && err != nil && strings.Contains(err.Error(), "exit status 128") { colorFunction := color.New(color.FgRed).SprintFunc() |