aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-02-23 01:40:53 +0800
committerGitHub <noreply@github.com>2024-02-22 17:40:53 +0000
commit5ed17d9895bf678374ef5227ca37870c1c170802 (patch)
treeeb6ace032055265d6940f2d1caa1a52eec5eed1d
parenteaede2de98fbe0ac2156c9f4cd8b5899d2c7cbbf (diff)
downloadgitea-5ed17d9895bf678374ef5227ca37870c1c170802.tar.gz
gitea-5ed17d9895bf678374ef5227ca37870c1c170802.zip
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>
-rw-r--r--modules/repository/repo.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/repository/repo.go b/modules/repository/repo.go
index fc3af04071..39bdc6adcf 100644
--- a/modules/repository/repo.go
+++ b/modules/repository/repo.go
@@ -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 {
- 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