Files
lazygit/pkg/commands/loader_adapters.go
Jesse Duffield 66e840bc3f more refactoring
2022-01-04 09:07:15 +11:00

29 lines
683 B
Go

package commands
import (
"io/ioutil"
"path/filepath"
"github.com/jesseduffield/lazygit/pkg/commands/loaders"
"github.com/jesseduffield/lazygit/pkg/commands/oscommands"
"github.com/jesseduffield/lazygit/pkg/common"
)
// this file defines constructors for loaders, passing in all the dependencies required based on a smaller set of arguments passed in by the client.
func NewCommitLoader(
cmn *common.Common,
gitCommand *GitCommand,
osCommand *oscommands.OSCommand,
) *loaders.CommitLoader {
return loaders.NewCommitLoader(
cmn,
gitCommand.Cmd,
gitCommand.CurrentBranchName,
gitCommand.RebaseMode,
ioutil.ReadFile,
filepath.Walk,
gitCommand.DotGitDir,
)
}