mirror of
https://github.com/go-gitea/gitea
synced 2025-07-12 13:37: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:
@ -77,8 +77,8 @@ func (t *TemporaryUploadRepository) Clone(branch string) error {
|
||||
}
|
||||
|
||||
// Init the repository
|
||||
func (t *TemporaryUploadRepository) Init(objectFormat git.ObjectFormat) error {
|
||||
if err := git.InitRepository(t.ctx, t.basePath, false, objectFormat); err != nil {
|
||||
func (t *TemporaryUploadRepository) Init(objectFormatName string) error {
|
||||
if err := git.InitRepository(t.ctx, t.basePath, false, objectFormatName); err != nil {
|
||||
return err
|
||||
}
|
||||
gitRepo, err := git.OpenRepository(t.ctx, t.basePath)
|
||||
|
Reference in New Issue
Block a user