mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-25 22:32:13 +02:00
standardise helper args
This commit is contained in:
@@ -9,8 +9,7 @@ import (
|
||||
)
|
||||
|
||||
type UpstreamHelper struct {
|
||||
c *HelperCommon
|
||||
model *types.Model
|
||||
c *HelperCommon
|
||||
|
||||
getRemoteBranchesSuggestionsFunc func(string) func(string) []*types.Suggestion
|
||||
}
|
||||
@@ -26,12 +25,10 @@ var _ IUpstreamHelper = &UpstreamHelper{}
|
||||
|
||||
func NewUpstreamHelper(
|
||||
c *HelperCommon,
|
||||
model *types.Model,
|
||||
getRemoteBranchesSuggestionsFunc func(string) func(string) []*types.Suggestion,
|
||||
) *UpstreamHelper {
|
||||
return &UpstreamHelper{
|
||||
c: c,
|
||||
model: model,
|
||||
getRemoteBranchesSuggestionsFunc: getRemoteBranchesSuggestionsFunc,
|
||||
}
|
||||
}
|
||||
@@ -70,7 +67,7 @@ func (self *UpstreamHelper) PromptForUpstreamWithoutInitialContent(_ *models.Bra
|
||||
}
|
||||
|
||||
func (self *UpstreamHelper) GetSuggestedRemote() string {
|
||||
return getSuggestedRemote(self.model.Remotes)
|
||||
return getSuggestedRemote(self.c.Model().Remotes)
|
||||
}
|
||||
|
||||
func getSuggestedRemote(remotes []*models.Remote) string {
|
||||
|
||||
Reference in New Issue
Block a user