mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +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:
@@ -158,7 +158,7 @@ func RestoreBranchPost(ctx *context.Context) {
|
||||
if err := repo_service.PushUpdate(
|
||||
&repo_module.PushUpdateOptions{
|
||||
RefFullName: git.RefNameFromBranch(deletedBranch.Name),
|
||||
OldCommitID: objectFormat.Empty().String(),
|
||||
OldCommitID: objectFormat.EmptyObjectID().String(),
|
||||
NewCommitID: deletedBranch.CommitID,
|
||||
PusherID: ctx.Doer.ID,
|
||||
PusherName: ctx.Doer.Name,
|
||||
|
Reference in New Issue
Block a user