mirror of
				https://github.com/jesseduffield/lazygit.git
				synced 2025-10-30 23:57:43 +02:00 
			
		
		
		
	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.
		
			
				
	
	
		
			23 lines
		
	
	
		
			799 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			799 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package gui
 | |
| 
 | |
| import (
 | |
| 	"github.com/jesseduffield/lazygit/pkg/commands/git_commands"
 | |
| 	"github.com/jesseduffield/lazygit/pkg/commands/oscommands"
 | |
| 	"github.com/jesseduffield/lazygit/pkg/config"
 | |
| 	"github.com/jesseduffield/lazygit/pkg/updates"
 | |
| 	"github.com/jesseduffield/lazygit/pkg/utils"
 | |
| )
 | |
| 
 | |
| func NewDummyUpdater() *updates.Updater {
 | |
| 	newAppConfig := config.NewDummyAppConfig()
 | |
| 	dummyUpdater, _ := updates.NewUpdater(utils.NewDummyCommon(), newAppConfig, oscommands.NewDummyOSCommand())
 | |
| 	return dummyUpdater
 | |
| }
 | |
| 
 | |
| // NewDummyGui creates a new dummy GUI for testing
 | |
| func NewDummyGui() *Gui {
 | |
| 	newAppConfig := config.NewDummyAppConfig()
 | |
| 	dummyGui, _ := NewGui(utils.NewDummyCommon(), newAppConfig, &git_commands.GitVersion{Major: 2, Minor: 0, Patch: 0}, NewDummyUpdater(), false, "", nil)
 | |
| 	return dummyGui
 | |
| }
 |