From be8d5f14a4d987f1f98421e317d82b05f88b02c3 Mon Sep 17 00:00:00 2001 From: "go-git-renovate[bot]" <245267575+go-git-renovate[bot]@users.noreply.github.com> Date: Sun, 20 Sep 2026 09:35:28 +0000 Subject: [PATCH 1/2] build: Update dependency golangci/golangci-lint to v2.13.1 Signed-off-by: go-git-renovate[bot] <245267575+go-git-renovate[bot]@users.noreply.github.com> Signed-off-by: go-git-renovate[bot] <245267575+go-git-renovate[bot]@users.noreply.github.com> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8748f19..99e86b3 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # renovate: datasource=github-tags depName=golangci/golangci-lint -GOLANGCI_VERSION ?= v2.12.2 +GOLANGCI_VERSION ?= v2.13.1 TOOLS_BIN := $(shell mkdir -p build/tools && realpath build/tools) GOLANGCI = $(TOOLS_BIN)/golangci-lint-$(GOLANGCI_VERSION) From 5d685cd41285afeff24193957d6405c0d9cdb761 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 23 Sep 2026 16:04:46 +0000 Subject: [PATCH 2/2] fix: restore golangci-lint v2.13 validation Co-authored-by: pjbgf <5452977+pjbgf@users.noreply.github.com> --- .golangci.yaml | 1 + cmd/gogit/cat-file.go | 4 ++-- internal/plumbing/object/mktree_test.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index 747aaf5..22e317d 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -7,6 +7,7 @@ linters: - depguard - gochecknoglobals - exhaustruct + - exhaustruct_v5 - err113 - gochecknoinits - ireturn diff --git a/cmd/gogit/cat-file.go b/cmd/gogit/cat-file.go index 6b4e717..e1fda60 100644 --- a/cmd/gogit/cat-file.go +++ b/cmd/gogit/cat-file.go @@ -69,7 +69,7 @@ var catFileCmd = &cobra.Command{ // catFileExistsCheck never returns: it calls os.Exit(1) when the object is // absent and os.Exit(0) when it is present. The signature returns error only // to fit cobra's RunE contract via its caller. -func catFileExistsCheck(r *git.Repository, oid string) error { //nolint:unparam +func catFileExistsCheck(r *git.Repository, oid string) error { h := plumbing.NewHash(oid) if _, err := r.Storer.EncodedObject(plumbing.AnyObject, h); err != nil { os.Exit(1) @@ -122,7 +122,7 @@ func catFileBatchCheckRun(cmd *cobra.Command, r *git.Repository, stdin io.Reader continue } - oid := strings.SplitN(raw, " ", 2)[0] + oid, _, _ := strings.Cut(raw, " ") h := plumbing.NewHash(oid) diff --git a/internal/plumbing/object/mktree_test.go b/internal/plumbing/object/mktree_test.go index 5538fce..9b36fc3 100644 --- a/internal/plumbing/object/mktree_test.go +++ b/internal/plumbing/object/mktree_test.go @@ -71,7 +71,7 @@ func TestWriteTreeRawAcceptsNullHash(t *testing.T) { t.Parallel() store := memory.NewStorage() - _ = (storer.EncodedObjectStorer)(store) // type assertion check + _ = storer.EncodedObjectStorer(store) // type assertion check obj := store.NewEncodedObject() obj.SetType(plumbing.TreeObject)