Skip to content

Commit

Permalink
Ignore the linux anchor point to avoid linux migrate failure (go-gite…
Browse files Browse the repository at this point in the history
…a#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>
  • Loading branch information
2 people authored and GiteaBot committed Feb 22, 2024
1 parent 511298e commit 4a89820
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/repository/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ func SyncReleasesWithTags(ctx context.Context, repo *repo_model.Repository, gitR
}

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
Expand Down

0 comments on commit 4a89820

Please sign in to comment.