Fast implementation of Git in pure Go

*: Fix lints

runxiyu.tngl.sh 78a03521 ecc20a7b

verified
+5 -4
+2 -2
object/tree_parse_test.go
··· 60 60 for _, want := range inserted.Entries { 61 61 got := tree.Entry(want.Name) 62 62 63 - if got == nil { //nolint:staticcheck 63 + if got == nil { 64 64 t.Fatalf("Entry(%q) returned nil", want.Name) 65 65 } 66 66 67 - if got.Mode != want.Mode || got.ID != want.ID { //nolint:staticcheck 67 + if got.Mode != want.Mode || got.ID != want.ID { 68 68 t.Fatalf("Entry(%q) mismatch", want.Name) 69 69 } 70 70 }
+1
objectstore/packed/store.go
··· 73 73 // Close releases mapped pack/index resources associated with the store. 74 74 func (store *Store) Close() error { 75 75 store.stateMu.Lock() 76 + 76 77 if store.closed { 77 78 store.stateMu.Unlock() 78 79
+2 -2
repository/stored_test.go
··· 316 316 for name, wantMode := range expect { 317 317 entry := rootTree.Tree().Entry([]byte(name)) 318 318 319 - if entry == nil { //nolint:staticcheck 319 + if entry == nil { 320 320 t.Fatalf("Entry(%q) returned nil", name) 321 321 } 322 322 323 - if entry.Mode != wantMode { //nolint:staticcheck 323 + if entry.Mode != wantMode { 324 324 t.Fatalf("Entry(%q) mode = %o, want %o", name, entry.Mode, wantMode) 325 325 } 326 326 }