1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

Replace CurrentContext() with Context().Current()

This commit is contained in:
Stefan Haller
2024-08-08 10:26:55 +02:00
parent 8e15451117
commit 7ed94c0410
23 changed files with 24 additions and 29 deletions

View File

@ -109,7 +109,7 @@ func (self *RefsHelper) CheckoutRemoteBranch(fullBranchName string, localBranchN
checkout := func(branchName string) error {
// Switch to the branches context _before_ starting to check out the
// branch, so that we see the inline status
if self.c.CurrentContext() != self.c.Contexts().Branches {
if self.c.Context().Current() != self.c.Contexts().Branches {
if err := self.c.Context().Push(self.c.Contexts().Branches); err != nil {
return err
}
@ -292,7 +292,7 @@ func (self *RefsHelper) NewBranch(from string, fromFormattedName string, suggest
return err
}
if self.c.CurrentContext() != self.c.Contexts().Branches {
if self.c.Context().Current() != self.c.Contexts().Branches {
if err := self.c.Context().Push(self.c.Contexts().Branches); err != nil {
return err
}