mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
refactor
This commit is contained in:
@ -92,6 +92,10 @@ func NewGitCommandAux(
|
||||
) *GitCommand {
|
||||
cmd := NewGitCmdObjBuilder(cmn.Log, osCommand.Cmd)
|
||||
|
||||
// here we're doing a bunch of dependency injection for each of our commands structs.
|
||||
// This is admittedly messy, but allows us to test each command struct in isolation,
|
||||
// and allows for better namespacing when compared to having every method living
|
||||
// on the one struct.
|
||||
configCommands := NewConfigCommands(cmn, gitConfig)
|
||||
statusCommands := NewStatusCommands(cmn, osCommand, repo, dotGitDir)
|
||||
fileLoader := loaders.NewFileLoader(cmn, cmd, configCommands)
|
||||
|
Reference in New Issue
Block a user