Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to delete tags when syncing mirror #5192

Closed
1 of 3 tasks
yasuokav opened this issue Oct 26, 2018 · 0 comments · Fixed by #5609
Closed
1 of 3 tasks

Unable to delete tags when syncing mirror #5192

yasuokav opened this issue Oct 26, 2018 · 0 comments · Fixed by #5609
Labels

Comments

@yasuokav
Copy link
Contributor

  • Gitea version (or commit ref): 1.6.0-rc1 / aeb5655
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
[...odels/repo_mirror.go:335 SyncMirrors()] [E] Failed to synchronize tags to releases for repository: GetTagCommitID: object does not exist [id: refs/tags/test, rel_path: ]

Description

Step to reproduce:

  1. Delete a tag from Repo1
  2. Sync Repo2 (mirror of Repo1)

gitea/models/release.go

Lines 488 to 495 in aeb5655

commitID, err := gitRepo.GetTagCommitID(rel.TagName)
if err != nil {
return fmt.Errorf("GetTagCommitID: %v", err)
}
if !gitRepo.IsTagExist(rel.TagName) || commitID != rel.Sha1 {
if err := pushUpdateDeleteTag(repo, gitRepo, rel.TagName); err != nil {
return fmt.Errorf("pushUpdateDeleteTag: %v", err)
}

@lunny lunny added the type/bug label Oct 27, 2018
HarshitOnGitHub added a commit to HarshitOnGitHub/gitea that referenced this issue Dec 30, 2018
This bug was being caused by an error in the logic in `release.go`.
Credit to @yasuokav for tracing the root of the issue.

Fixes: go-gitea#5192.
techknowlogick pushed a commit that referenced this issue Dec 31, 2018
…5609)

This bug was being caused by an error in the logic in `release.go`.
Credit to @yasuokav for tracing the root of the issue.

Fixes: #5192.
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants