1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

pass callback directly

This commit is contained in:
Jesse Duffield
2020-08-11 20:25:36 +10:00
parent 79e73d2eff
commit 1b78a42b80
3 changed files with 6 additions and 12 deletions

View File

@ -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()