mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
Optimize number of early calls to GetRepoPaths
This change reduces the number of calls during application startup to one, calling GetRepoPaths() earlier than previously and plumbing the repoPaths struct around to achieve this end.
This commit is contained in:
@ -8,12 +8,7 @@ import (
|
||||
// updateRecentRepoList registers the fact that we opened lazygit in this repo,
|
||||
// so that we can open the same repo via the 'recent repos' menu
|
||||
func (gui *Gui) updateRecentRepoList() error {
|
||||
isBareRepo, err := gui.git.Status.IsBareRepo()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if isBareRepo {
|
||||
if gui.git.Status.IsBareRepo() {
|
||||
// we could totally do this but it would require storing both the git-dir and the
|
||||
// worktree in our recent repos list, which is a change that would need to be
|
||||
// backwards compatible
|
||||
|
Reference in New Issue
Block a user