Skip to content

Commit d47057f

Browse files
lunnyGiteaBot
authored andcommitted
Fix adopt repository has empty object name in database (go-gitea#31333)
Fix go-gitea#31330 Fix go-gitea#31311 A workaround to fix the old database is to update object_format_name to `sha1` if it's empty or null.
1 parent 758f84f commit d47057f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/repository/branch.go

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ func SyncRepoBranchesWithRepo(ctx context.Context, repo *repo_model.Repository,
4545
if err != nil {
4646
return 0, fmt.Errorf("UpdateRepository: %w", err)
4747
}
48+
repo.ObjectFormatName = objFmt.Name() // keep consistent with db
4849

4950
allBranches := container.Set[string]{}
5051
{

0 commit comments

Comments
 (0)