summaryrefslogtreecommitdiffstats
path: root/pkg/gui/refresh.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-02-13 17:01:53 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-17 19:13:40 +1100
commit371b8d638b55ecce5c99700072051a9d15df7d96 (patch)
tree2b13700b359a54045cda8f76e730f3ace4473115 /pkg/gui/refresh.go
parent55af07a1bb4e1d3f85a456c2604c46e5535aca40 (diff)
more consistent naming
Diffstat (limited to 'pkg/gui/refresh.go')
-rw-r--r--pkg/gui/refresh.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/pkg/gui/refresh.go b/pkg/gui/refresh.go
index 215028609..d9d661cff 100644
--- a/pkg/gui/refresh.go
+++ b/pkg/gui/refresh.go
@@ -186,7 +186,7 @@ func (gui *Gui) refreshCommits() {
go utils.Safe(func() {
_ = gui.refreshCommitsWithLimit()
ctx, ok := gui.State.Contexts.CommitFiles.GetParentContext()
- if ok && ctx.GetKey() == context.BRANCH_COMMITS_CONTEXT_KEY {
+ if ok && 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 SHA 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.
@@ -206,16 +206,16 @@ func (gui *Gui) refreshCommits() {
}
func (gui *Gui) refreshCommitsWithLimit() error {
- gui.Mutexes.BranchCommitsMutex.Lock()
- defer gui.Mutexes.BranchCommitsMutex.Unlock()
+ gui.Mutexes.LocalCommitsMutex.Lock()
+ defer gui.Mutexes.LocalCommitsMutex.Unlock()
commits, err := gui.git.Loaders.Commits.GetCommits(
loaders.GetCommitsOptions{
- Limit: gui.State.Contexts.BranchCommits.GetLimitCommits(),
+ Limit: gui.State.Contexts.LocalCommits.GetLimitCommits(),
FilterPath: gui.State.Modes.Filtering.GetPath(),
IncludeRebaseCommits: true,
RefName: gui.refForLog(),
- All: gui.State.Contexts.BranchCommits.GetShowWholeGitGraph(),
+ All: gui.State.Contexts.LocalCommits.GetShowWholeGitGraph(),
},
)
if err != nil {
@@ -223,12 +223,12 @@ func (gui *Gui) refreshCommitsWithLimit() error {
}
gui.State.Model.Commits = commits
- return gui.c.PostRefreshUpdate(gui.State.Contexts.BranchCommits)
+ return gui.c.PostRefreshUpdate(gui.State.Contexts.LocalCommits)
}
func (gui *Gui) refreshRebaseCommits() error {
- gui.Mutexes.BranchCommitsMutex.Lock()
- defer gui.Mutexes.BranchCommitsMutex.Unlock()
+ gui.Mutexes.LocalCommitsMutex.Lock()
+ defer gui.Mutexes.LocalCommitsMutex.Unlock()
updatedCommits, err := gui.git.Loaders.Commits.MergeRebasingCommits(gui.State.Model.Commits)
if err != nil {
@@ -236,7 +236,7 @@ func (gui *Gui) refreshRebaseCommits() error {
}
gui.State.Model.Commits = updatedCommits
- return gui.c.PostRefreshUpdate(gui.State.Contexts.BranchCommits)
+ return gui.c.PostRefreshUpdate(gui.State.Contexts.LocalCommits)
}
func (self *Gui) refreshTags() error {