From 3c17bf761a63310e3760980b07b003b4ba44e0e3 Mon Sep 17 00:00:00 2001 From: mjarkk Date: Mon, 10 Dec 2018 07:46:26 +0100 Subject: [PATCH] Better name for this function --- pkg/gui/gui.go | 2 +- pkg/gui/recent_repos_panel.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index d47913c32..f9cf16475 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -514,7 +514,7 @@ func (gui *Gui) Run() error { go func() { _, err := gui.fetch(g, g.CurrentView(), false) - if err != nil && strings.Contains(err.Error(), "exit status 128") && gui.canShowIsPrivateRepo() { + if err != nil && strings.Contains(err.Error(), "exit status 128") && gui.IsNewPrivateRepo() { gui.introAgree.Wait() _ = gui.createConfirmationPanel(g, g.CurrentView(), gui.Tr.SLocalize("NoAutomaticGitFetchTitle"), gui.Tr.SLocalize("NoAutomaticGitFetchBody"), nil, nil) } else { diff --git a/pkg/gui/recent_repos_panel.go b/pkg/gui/recent_repos_panel.go index 6f528896e..4ee990076 100644 --- a/pkg/gui/recent_repos_panel.go +++ b/pkg/gui/recent_repos_panel.go @@ -59,8 +59,8 @@ func (gui *Gui) updateRecentRepoList() error { return gui.Config.SaveAppState() } -// canShowIsPrivateRepo returns true if a private repo is never opend before in lazygit -func (gui *Gui) canShowIsPrivateRepo() bool { +// IsNewPrivateRepo returns true if a private repo is never opend before in lazygit +func (gui *Gui) IsNewPrivateRepo() bool { repos := gui.Config.GetAppState().RecentPrivateRepos currentRepo, err := os.Getwd() if err != nil {