summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-10-03 09:36:46 +0200
committerStefan Haller <stefan@haller-berlin.de>2023-10-03 09:36:46 +0200
commit6fd80565c73fe6b61e73c36b1868472b91642fdd (patch)
tree8fe3f3b1e5dbfd94ef66328df876967bd4498494
parent3cda1d03d954f8a9f695bedaa97d183496842e7c (diff)
Band-aid fix for submodule/reset.go test failure
This is not a complete fix, but it's good enough to fix the spurious test failures of submodule/reset.go. We have some vague hope to fix this in a more sustainable way by somehow improving our concurrency model fundamentally, but that's a more long-term undertaking, and it's annoying that this test fails so often, so let's fix it in this way for now.
-rw-r--r--pkg/gui/controllers/helpers/refresh_helper.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/gui/controllers/helpers/refresh_helper.go b/pkg/gui/controllers/helpers/refresh_helper.go
index 578089af1..f04b102e4 100644
--- a/pkg/gui/controllers/helpers/refresh_helper.go
+++ b/pkg/gui/controllers/helpers/refresh_helper.go
@@ -449,9 +449,11 @@ func (self *RefreshHelper) refreshBranches() {
// Need to re-render the commits view because the visualization of local
// branch heads might have changed
+ self.c.Mutexes().LocalCommitsMutex.Lock()
if err := self.c.Contexts().LocalCommits.HandleRender(); err != nil {
self.c.Log.Error(err)
}
+ self.c.Mutexes().LocalCommitsMutex.Unlock()
self.refreshStatus()
}