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

And fix some comments
This commit is contained in:
wxiaoguang authored and GitHub committed 2023-12-14 16:51:05 +08:00
1 parent 52046b934d
commit 9947af639c
4 files changed
+11 -12

No files matched your search

-2
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: