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-27 12:03:06 +02:00
parent e5c39d5401
commit 5307999874
@@ -345,6 +345,10 @@ func (self *RefreshHelper) refreshCommitsWithLimit() error {
}
func (self *RefreshHelper) refreshSubCommitsWithLimit() error {
if self.c.Contexts().SubCommits.GetRef() == nil {
return nil
}
self.c.Mutexes().SubCommitsMutex.Lock()
defer self.c.Mutexes().SubCommitsMutex.Unlock()