Skip to content

Commit 6f52e7a

Browse files
committed
MINOR: adding lint fixes
1 parent 069fd2f commit 6f52e7a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

check-commit/check.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ func getCommitSubjects(repo *git.Repository, from, to string) ([]string, error)
253253
refStrings = append(refStrings, from)
254254
refStrings = append(refStrings, to)
255255

256-
var hashes []*plumbing.Hash
256+
hashes := make([]*plumbing.Hash, 0, 2)
257257

258258
for _, refString := range refStrings {
259259
hash, err := repo.ResolveRevision(plumbing.Revision(refString))
@@ -264,7 +264,7 @@ func getCommitSubjects(repo *git.Repository, from, to string) ([]string, error)
264264
hashes = append(hashes, hash)
265265
}
266266

267-
var commits []*object.Commit
267+
commits := make([]*object.Commit, 0, 2)
268268

269269
for _, hash := range hashes {
270270
commit, err := repo.CommitObject(*hash)

0 commit comments

Comments
 (0)