mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
Remove bool return value of GetParentContext()
The comments that I'm deleting here explain why we need the bool; however, in our case that's a theoretical issue. It would only arise if we ever were to pass a nil context to SetParentContext, which we never do.
This commit is contained in:
parent
d570552206
commit
1eb5d89f1d
5 changed files with 9 additions and 13 deletions
|
@ -276,8 +276,8 @@ func (self *RefreshHelper) refreshReflogAndBranches(refreshWorktrees bool, keepB
|
|||
|
||||
func (self *RefreshHelper) refreshCommitsAndCommitFiles() {
|
||||
_ = self.refreshCommitsWithLimit()
|
||||
ctx, ok := self.c.Contexts().CommitFiles.GetParentContext()
|
||||
if ok && ctx.GetKey() == context.LOCAL_COMMITS_CONTEXT_KEY {
|
||||
ctx := self.c.Contexts().CommitFiles.GetParentContext()
|
||||
if ctx != nil && ctx.GetKey() == context.LOCAL_COMMITS_CONTEXT_KEY {
|
||||
// This makes sense when we've e.g. just amended a commit, meaning we get a new commit hash at the same position.
|
||||
// However if we've just added a brand new commit, it pushes the list down by one and so we would end up
|
||||
// showing the contents of a different commit than the one we initially entered.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue