Only use SHA256 feature when git >= 2.42 (#28466)

And fix some comments
This commit is contained in:
wxiaoguang 2023-12-14 16:51:05 +08:00 committed by GitHub
parent 52046b934d
commit 9947af639c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 12 deletions

View file

@ -40,7 +40,6 @@ type ObjectFormat interface {
NewHasher() HasherInterface
}
/* SHA1 Type */
type Sha1ObjectFormat struct{}
func (*Sha1ObjectFormat) ID() ObjectFormatID { return Sha1 }
@ -83,7 +82,6 @@ func (h *Sha1ObjectFormat) NewHasher() HasherInterface {
return &Sha1Hasher{sha1.New()}
}
// utils
func ObjectFormatFromID(id ObjectFormatID) ObjectFormat {
switch id {
case Sha1: