1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-06 22:33:07 +02:00

Allow passing SUB_COMMITS scope to Refresh when no subcommits view is showing

We don't currently do this, but will in the next commit; it's a reasonable thing
to want to do, and it shouldn't crash.
This commit is contained in:
Stefan Haller
2025-07-11 15:07:35 +02:00
parent e5c39d5401
commit 5307999874

View File

@ -345,6 +345,10 @@ func (self *RefreshHelper) refreshCommitsWithLimit() error {
} }
func (self *RefreshHelper) refreshSubCommitsWithLimit() error { func (self *RefreshHelper) refreshSubCommitsWithLimit() error {
if self.c.Contexts().SubCommits.GetRef() == nil {
return nil
}
self.c.Mutexes().SubCommitsMutex.Lock() self.c.Mutexes().SubCommitsMutex.Lock()
defer self.c.Mutexes().SubCommitsMutex.Unlock() defer self.c.Mutexes().SubCommitsMutex.Unlock()