forked from NYANDEV/forgejo
Only use SHA256 feature when git >= 2.42 (#28466)
And fix some comments
This commit is contained in:
parent
52046b934d
commit
9947af639c
4 changed files with 11 additions and 12 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue