1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-15 15:07:20 +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:
Lunny Xiao
2023-12-17 19:56:08 +08:00
committed by GitHub
parent 7fb6b51470
commit 408a484224
54 changed files with 191 additions and 203 deletions

View File

@ -131,12 +131,12 @@ func TestGetCommitFilesChanged(t *testing.T) {
files []string
}{
{
repo.objectFormat.Empty().String(),
repo.objectFormat.EmptyObjectID().String(),
"95bb4d39648ee7e325106df01a621c530863a653",
[]string{"file1.txt"},
},
{
repo.objectFormat.Empty().String(),
repo.objectFormat.EmptyObjectID().String(),
"8d92fc957a4d7cfd98bc375f0b7bb189a0d6c9f2",
[]string{"file2.txt"},
},