Skip to content

Commit

Permalink
Fix adopt repository has empty object name in database (#31333)
Browse files Browse the repository at this point in the history
Fix #31330
Fix #31311

A workaround to fix the old database is to update object_format_name to
`sha1` if it's empty or null.
  • Loading branch information
lunny authored Jun 12, 2024
1 parent a975ce8 commit 1968c22
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/repository/branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func SyncRepoBranchesWithRepo(ctx context.Context, repo *repo_model.Repository,
if err != nil {
return 0, fmt.Errorf("UpdateRepository: %w", err)
}
repo.ObjectFormatName = objFmt.Name() // keep consistent with db

allBranches := container.Set[string]{}
{
Expand Down

0 comments on commit 1968c22

Please # to comment.