0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-09 03:21:45 +01:00

Ignore the linux anchor point to avoid linux migrate failure (#29295)

Fix #28843

This PR will bypass the pushUpdateTag to database failure when
syncAllTags. An error log will be recorded.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Lunny Xiao 2024-02-23 01:40:53 +08:00 committed by GitHub
parent eaede2de98
commit 5ed17d9895
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -352,7 +352,9 @@ func SyncReleasesWithTags(ctx context.Context, repo *repo_model.Repository, gitR
} }
if err := PushUpdateAddTag(ctx, repo, gitRepo, tagName, sha1, refname); err != nil { if err := PushUpdateAddTag(ctx, repo, gitRepo, tagName, sha1, refname); err != nil {
return fmt.Errorf("unable to PushUpdateAddTag: %q to Repo[%d:%s/%s]: %w", tagName, repo.ID, repo.OwnerName, repo.Name, err) // sometimes, some tags will be sync failed. i.e. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tag/?h=v2.6.11
// this is a tree object, not a tag object which created before git
log.Error("unable to PushUpdateAddTag: %q to Repo[%d:%s/%s]: %v", tagName, repo.ID, repo.OwnerName, repo.Name, err)
} }
return nil return nil