mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 04:45:47 +02:00
start breaking up git struct
This commit is contained in:
parent
4a1d23dc27
commit
f503ff1ecb
76 changed files with 2234 additions and 1758 deletions
|
@ -27,19 +27,15 @@ type BranchLoader struct {
|
|||
getCurrentBranchName func() (string, string, error)
|
||||
}
|
||||
|
||||
type BranchLoaderGitCommand interface {
|
||||
GetRawBranches() (string, error)
|
||||
CurrentBranchName() (string, string, error)
|
||||
}
|
||||
|
||||
func NewBranchLoader(
|
||||
cmn *common.Common,
|
||||
gitCommand BranchLoaderGitCommand,
|
||||
getRawBranches func() (string, error),
|
||||
getCurrentBranchName func() (string, string, error),
|
||||
) *BranchLoader {
|
||||
return &BranchLoader{
|
||||
Common: cmn,
|
||||
getRawBranches: gitCommand.GetRawBranches,
|
||||
getCurrentBranchName: gitCommand.CurrentBranchName,
|
||||
getRawBranches: getRawBranches,
|
||||
getCurrentBranchName: getCurrentBranchName,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue