Make "sync branch" also sync object format and add tests (#30878)

This commit is contained in:
wxiaoguang 2024-05-07 01:02:30 +08:00 committed by GitHub
parent 7c613f100e
commit 9c08637eae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 45 additions and 27 deletions

View file

@ -195,6 +195,10 @@ func adoptRepository(ctx context.Context, repoPath string, repo *repo_model.Repo
}
defer gitRepo.Close()
if _, err = repo_module.SyncRepoBranchesWithRepo(ctx, repo, gitRepo, 0); err != nil {
return fmt.Errorf("SyncRepoBranches: %w", err)
}
if err = repo_module.SyncReleasesWithTags(ctx, repo, gitRepo); err != nil {
return fmt.Errorf("SyncReleasesWithTags: %w", err)
}