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:
@ -239,5 +239,5 @@ func (self *BisectController) Context() types.Context {
|
||||
}
|
||||
|
||||
func (self *BisectController) context() *context.LocalCommitsContext {
|
||||
return self.contexts.BranchCommits
|
||||
return self.contexts.LocalCommits
|
||||
}
|
||||
|
@ -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,
|
||||
} {
|
||||
|
@ -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})
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user