Commit Graph

3 Commits (2cc65e356e02ef4ce11364949c2c5bec742d629b)

Author SHA1 Message Date
wxiaoguang cd70ab31cd
Fix incorrect object id hash function ()
Great thanks to @oliverpool for figuring out the problem and proposing a
fix.

Regression of 

Incorrect hash causes the user's LFS files get all deleted when running
`doctor fix all`

(by the way, remove unused/non-standard comments)

Co-authored-by: Giteabot <teabot@gitea.io>
Lunny Xiao 408a484224
Adjust object format interface ()
- Remove `ObjectFormatID`
- Remove function `ObjectFormatFromID`.
- Use `Sha1ObjectFormat` directly but not a pointer because it's an
empty struct.
- Store `ObjectFormatName` in `repository` struct
Adam Majer cbf923e87b
Abstract hash function usage ()
Refactor Hash interfaces and centralize hash function. This will allow
easier introduction of different hash function later on.

This forms the "no-op" part of the SHA256 enablement patch.