Skip to content

Commit 4a89820

Browse files
lunnywxiaoguang
authored andcommitted
Ignore the linux anchor point to avoid linux migrate failure (go-gitea#29295)
Fix go-gitea#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>
1 parent 511298e commit 4a89820

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/repository/repo.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,9 @@ func SyncReleasesWithTags(ctx context.Context, repo *repo_model.Repository, gitR
334334
}
335335

336336
if err := PushUpdateAddTag(ctx, repo, gitRepo, tagName, sha1, refname); err != nil {
337-
return fmt.Errorf("unable to PushUpdateAddTag: %q to Repo[%d:%s/%s]: %w", tagName, repo.ID, repo.OwnerName, repo.Name, err)
337+
// 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
338+
// this is a tree object, not a tag object which created before git
339+
log.Error("unable to PushUpdateAddTag: %q to Repo[%d:%s/%s]: %v", tagName, repo.ID, repo.OwnerName, repo.Name, err)
338340
}
339341

340342
return nil

0 commit comments

Comments
 (0)