Skip to content

Commit ab089dd

Browse files
committed
libgit2: use bytes.Equal instead of .Compare
Signed-off-by: Hidde Beydals <hello@hidde.co>
1 parent 9c1c814 commit ab089dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/git/libgit2/transport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ func (k knownKey) matches(host string, hostkey git2go.HostkeyCertificate) bool {
266266
return false
267267
}
268268
hasher.Write(k.key.Marshal())
269-
return bytes.Compare(hasher.Sum(nil), fingerprint) == 0
269+
return bytes.Equal(hasher.Sum(nil), fingerprint)
270270
}
271271

272272
func containsHost(hosts []string, host string) bool {

0 commit comments

Comments
 (0)