Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Continuous Integration

env:
GO_VERSION: 1.24
GO_VERSION: 1.25

on:
push:
Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.24.x
go-version: 1.25.x
- name: Test code
# we're passing -short so that we skip the integration tests, which will be run in parallel below
run: |
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.24.x
go-version: 1.25.x
- name: Print git version
run: git --version
- name: Test code
Expand All @@ -113,7 +113,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.24.x
go-version: 1.25.x
- name: Build linux binary
run: |
GOOS=linux go build
Expand All @@ -140,7 +140,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.24.x
go-version: 1.25.x
- name: Check Vendor Directory
# ensure our vendor directory matches up with our go modules
run: |
Expand All @@ -166,12 +166,12 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.24.x
go-version: 1.25.x
- name: Lint
uses: golangci/golangci-lint-action@v8
with:
# If you change this, make sure to also update scripts/golangci-lint-shim.sh
version: v2.2.1
version: v2.4.0
- name: errors
run: golangci-lint run
if: ${{ failure() }}
Expand All @@ -196,7 +196,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.24.x
go-version: 1.25.x

- name: Download all coverage artifacts
uses: actions/download-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.24.x
go-version: 1.25.x

- name: Run goreleaser
uses: goreleaser/goreleaser-action@v6
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: "2"
run:
go: "1.24"
go: "1.25"
linters:
enable:
- copyloopvar
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# docker build -t lazygit .
# docker run -it lazygit:latest /bin/sh

FROM golang:1.24 as build
FROM golang:1.25 as build
WORKDIR /go/src/github.com/jesseduffield/lazygit/
COPY go.mod go.sum ./
RUN go mod download
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/jesseduffield/lazygit

go 1.24.0
go 1.25.0

require (
dario.cat/mergo v1.0.1
Expand Down Expand Up @@ -84,3 +84,5 @@ require (
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
)

ignore ./test
39 changes: 30 additions & 9 deletions pkg/gui/controllers/helpers/refresh_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,34 @@ func (self *RefreshHelper) Refresh(options types.RefreshOptions) {
// whenever we change commits, we should update branches because the upstream/downstream
// counts can change. Whenever we change branches we should also change commits
// e.g. in the case of switching branches.
refresh("commits and commit files", self.refreshCommitsAndCommitFiles)

includeWorktreesWithBranches = scopeSet.Includes(types.WORKTREES)
if self.c.UserConfig().Git.LocalBranchSortOrder == "recency" {
refresh("reflog and branches", func() { self.refreshReflogAndBranches(includeWorktreesWithBranches, options.KeepBranchSelectionIndex) })
// To avoid lock ordering issues, we run these sequentially when both commits and branches need updating
if scopeSet.Includes(types.COMMITS) && (scopeSet.Includes(types.BRANCHES) || scopeSet.Includes(types.REFLOG)) {
includeWorktreesWithBranches = scopeSet.Includes(types.WORKTREES)
refresh("commits and branches", func() {
self.refreshCommitsAndCommitFiles()

if self.c.UserConfig().Git.LocalBranchSortOrder == "recency" {
self.refreshReflogAndBranches(includeWorktreesWithBranches, options.KeepBranchSelectionIndex)
} else {
self.refreshBranches(includeWorktreesWithBranches, options.KeepBranchSelectionIndex, true)
_ = self.refreshReflogCommits()
}
})
} else {
refresh("branches", func() { self.refreshBranches(includeWorktreesWithBranches, options.KeepBranchSelectionIndex, true) })
refresh("reflog", func() { _ = self.refreshReflogCommits() })
if scopeSet.Includes(types.COMMITS) {
refresh("commits and commit files", self.refreshCommitsAndCommitFiles)
}

includeWorktreesWithBranches = scopeSet.Includes(types.WORKTREES)
if scopeSet.Includes(types.BRANCHES) || scopeSet.Includes(types.REFLOG) {
if self.c.UserConfig().Git.LocalBranchSortOrder == "recency" {
refresh("reflog and branches", func() { self.refreshReflogAndBranches(includeWorktreesWithBranches, options.KeepBranchSelectionIndex) })
} else {
refresh("branches", func() { self.refreshBranches(includeWorktreesWithBranches, options.KeepBranchSelectionIndex, true) })
refresh("reflog", func() { _ = self.refreshReflogCommits() })
}
}
}
} else if scopeSet.Includes(types.REBASE_COMMITS) {
// the above block handles rebase commits so we only need to call this one
Expand Down Expand Up @@ -497,9 +517,10 @@ func (self *RefreshHelper) refreshBranches(refreshWorktrees bool, keepBranchSele

// Need to re-render the commits view because the visualization of local
// branch heads might have changed
self.c.Mutexes().LocalCommitsMutex.Lock()
self.c.Contexts().LocalCommits.HandleRender()
self.c.Mutexes().LocalCommitsMutex.Unlock()
self.c.OnUIThread(func() error {
self.c.Contexts().LocalCommits.HandleRender()
return nil
})

self.refreshStatus()
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/golangci-lint-shim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
set -e

# Must be kept in sync with the version in .github/workflows/ci.yml
version="v2.2.1"
version="v2.4.0"

go run "github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$version" "$@"
Loading