Skip to content
Open
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
1 change: 1 addition & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ linters:
- depguard
- gochecknoglobals
- exhaustruct
- exhaustruct_v5
- err113
- gochecknoinits
- ireturn
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions cmd/gogit/cat-file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion internal/plumbing/object/mktree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading