1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-14 22:47:21 +00:00

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