1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-15 01:34:26 +02:00

more consistent naming

This commit is contained in:
Jesse Duffield
2022-02-13 17:01:53 +11:00
parent 55af07a1bb
commit 371b8d638b
18 changed files with 48 additions and 48 deletions

View File

@ -239,5 +239,5 @@ func (self *BisectController) Context() types.Context {
}
func (self *BisectController) context() *context.LocalCommitsContext {
return self.contexts.BranchCommits
return self.contexts.LocalCommits
}

View File

@ -143,7 +143,7 @@ func (self *CherryPickHelper) resetIfNecessary(context types.Context) error {
func (self *CherryPickHelper) rerender() error {
for _, context := range []types.Context{
self.contexts.BranchCommits,
self.contexts.LocalCommits,
self.contexts.ReflogCommits,
self.contexts.SubCommits,
} {

View File

@ -55,9 +55,9 @@ func (self *RefsHelper) CheckoutRef(ref string, options types.CheckoutRefOptions
onSuccess := func() {
self.contexts.Branches.SetSelectedLineIdx(0)
self.contexts.ReflogCommits.SetSelectedLineIdx(0)
self.contexts.BranchCommits.SetSelectedLineIdx(0)
self.contexts.LocalCommits.SetSelectedLineIdx(0)
// loading a heap of commits is slow so we limit them whenever doing a reset
self.contexts.BranchCommits.SetLimitCommits(true)
self.contexts.LocalCommits.SetLimitCommits(true)
}
return self.c.WithWaitingStatus(waitingStatus, func() error {
@ -117,12 +117,12 @@ func (self *RefsHelper) ResetToRef(ref string, strength string, envVars []string
return self.c.Error(err)
}
self.contexts.BranchCommits.SetSelectedLineIdx(0)
self.contexts.LocalCommits.SetSelectedLineIdx(0)
self.contexts.ReflogCommits.SetSelectedLineIdx(0)
// loading a heap of commits is slow so we limit them whenever doing a reset
self.contexts.BranchCommits.SetLimitCommits(true)
self.contexts.LocalCommits.SetLimitCommits(true)
if err := self.c.PushContext(self.contexts.BranchCommits); err != nil {
if err := self.c.PushContext(self.contexts.LocalCommits); err != nil {
return err
}
@ -179,7 +179,7 @@ func (self *RefsHelper) NewBranch(from string, fromFormattedName string, suggest
}
}
self.contexts.BranchCommits.SetSelectedLineIdx(0)
self.contexts.LocalCommits.SetSelectedLineIdx(0)
self.contexts.Branches.SetSelectedLineIdx(0)
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC})

View File

@ -746,7 +746,7 @@ func (self *LocalCommitsController) Context() types.Context {
}
func (self *LocalCommitsController) context() *context.LocalCommitsContext {
return self.contexts.BranchCommits
return self.contexts.LocalCommits
}
func (self *LocalCommitsController) newBranch(commit *models.Commit) error {