mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Adjust object format interface (#28469)
- Remove `ObjectFormatID` - Remove function `ObjectFormatFromID`. - Use `Sha1ObjectFormat` directly but not a pointer because it's an empty struct. - Store `ObjectFormatName` in `repository` struct
This commit is contained in:
@ -12,7 +12,7 @@ import (
|
||||
func ParseGogitHash(h plumbing.Hash) ObjectID {
|
||||
switch hash.Size {
|
||||
case 20:
|
||||
return ObjectFormatFromID(Sha1).MustID(h[:])
|
||||
return Sha1ObjectFormat.MustID(h[:])
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user