summaryrefslogtreecommitdiffstats
path: root/pkg/gui/types
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-07-22 10:33:40 +1000
committerJesse Duffield <jessedduffield@gmail.com>2023-07-22 10:47:04 +1000
commit3cee37388c8d1688b2c8ff0e5b5509663b096952 (patch)
tree30631f961cbca2f00fe2e094d298d3610a9c3db8 /pkg/gui/types
parenta7969aef2c0d597ca97f060836233f21b2b68bc6 (diff)
Keep track of authors across local commits and branch commits for suggestions
Previously, we would only show the authors based on local commits, but sometimes you want to set a commit author to that of a commit on another branch. Now, so long as you've viewed the branch's commits, the author will appear as a suggestion.
Diffstat (limited to 'pkg/gui/types')
-rw-r--r--pkg/gui/types/common.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/gui/types/common.go b/pkg/gui/types/common.go
index 33b0f7a18..e485fbceb 100644
--- a/pkg/gui/types/common.go
+++ b/pkg/gui/types/common.go
@@ -217,6 +217,8 @@ type Model struct {
// for displaying suggestions while typing in a file name
FilesTrie *patricia.Trie
+
+ Authors map[string]*models.Author
}
// if you add a new mutex here be sure to instantiate it. We're using pointers to
@@ -228,6 +230,7 @@ type Mutexes struct {
SyncMutex *deadlock.Mutex
LocalCommitsMutex *deadlock.Mutex
SubCommitsMutex *deadlock.Mutex
+ AuthorsMutex *deadlock.Mutex
SubprocessMutex *deadlock.Mutex
PopupMutex *deadlock.Mutex
PtyMutex *deadlock.Mutex