Fix mirror sync parser and fix mirror messages#36504
Merged
lunny merged 4 commits intogo-gitea:mainfrom Feb 11, 2026
Merged
Conversation
Zettat123
approved these changes
Feb 1, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request refactors the mirror sync reference tracking system to fix a bug where deleted branches were incorrectly identified as tags in activity logs, and improves how branch/tag synchronization results are tracked and reported.
Changes:
- Introduces a new
SyncResultstruct to track reference changes during sync operations instead of parsing git command output - Updates
SyncRepoBranchesWithRepoandSyncReleasesWithTagsto return structured sync results - Fixes display of mirror sync activities to show correct reference paths (e.g.,
refs/heads/testfor branches vsrefs/tags/testfor tags)
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/repository/branch.go | Adds SyncResult struct and updates SyncRepoBranchesWithRepo to return sync results; fixes handling of recreated deleted branches |
| modules/repository/repo.go | Updates SyncReleasesWithTags to return sync results for tag operations |
| services/mirror/mirror_pull.go | Removes old git output parsing logic; now uses structured sync results from repository modules |
| services/mirror/mirror_pull_test.go | Removes obsolete test for removed parsing function |
| templates/user/dashboard/feeds.tmpl | Changes mirror sync messages to use .RefName instead of .GetBranch for correct reference display |
| routers/web/feed/convert.go | Similar template changes for feed conversion |
| services/repository/migrate.go | Updates caller to handle new return signature |
| services/repository/fork.go | Updates caller to handle new return signature |
| services/repository/adopt.go | Updates caller to handle new return signature |
| services/migrations/gitea_uploader.go | Updates caller to handle new return signature |
| cmd/admin.go | Updates caller to handle new return signature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
silverwind
approved these changes
Feb 10, 2026
silverwind
added a commit
to silverwind/gitea
that referenced
this pull request
Feb 12, 2026
* origin/main: (34 commits) Fine tune diff highlighting (go-gitea#36592) Add code editor setting dropdowns (go-gitea#36534) Update to go 1.26.0 and golangci-lint 2.9.0 (go-gitea#36588) Improve diff highlighting (go-gitea#36583) Fix markup code block layout (go-gitea#36578) Remove striped tables in UI (go-gitea#36509) Fix vertical alignment of `.commit-sign-badge` children (go-gitea#36570) Fix mirror sync parser and fix mirror messages (go-gitea#36504) Update JS and PY deps (go-gitea#36576) Add viewer controller for mermaid (zoom, drag) (go-gitea#36557) Misc typescript tweaks (go-gitea#36523) Use full-file highlighting for diff sections (go-gitea#36561) fix(diff): reprocess htmx content after loading more files (go-gitea#36568) [skip ci] Updated translations via Crowdin Add wrap to runner label list (go-gitea#36565) fix: add dnf5 command for Fedora in RPM package instructions (go-gitea#36527) Enable pagination on GiteaDownloader.getIssueReactions() (go-gitea#36549) Refactor merge conan and container auth preserve actions taskID (go-gitea#36560) Fix assignee sidebar links and empty placeholder after go-gitea#32465 refactor (go-gitea#36559) Fix various version parsing problems (go-gitea#36553) ...
silverwind
added a commit
to silverwind/gitea
that referenced
this pull request
Feb 12, 2026
* origin/main: (152 commits) Fine tune diff highlighting (go-gitea#36592) Add code editor setting dropdowns (go-gitea#36534) Update to go 1.26.0 and golangci-lint 2.9.0 (go-gitea#36588) Improve diff highlighting (go-gitea#36583) Fix markup code block layout (go-gitea#36578) Remove striped tables in UI (go-gitea#36509) Fix vertical alignment of `.commit-sign-badge` children (go-gitea#36570) Fix mirror sync parser and fix mirror messages (go-gitea#36504) Update JS and PY deps (go-gitea#36576) Add viewer controller for mermaid (zoom, drag) (go-gitea#36557) Misc typescript tweaks (go-gitea#36523) Use full-file highlighting for diff sections (go-gitea#36561) fix(diff): reprocess htmx content after loading more files (go-gitea#36568) [skip ci] Updated translations via Crowdin Add wrap to runner label list (go-gitea#36565) fix: add dnf5 command for Fedora in RPM package instructions (go-gitea#36527) Enable pagination on GiteaDownloader.getIssueReactions() (go-gitea#36549) Refactor merge conan and container auth preserve actions taskID (go-gitea#36560) Fix assignee sidebar links and empty placeholder after go-gitea#32465 refactor (go-gitea#36559) Fix various version parsing problems (go-gitea#36553) ...
Sirherobrine23
pushed a commit
to Sirherobrine23/gitea
that referenced
this pull request
Mar 4, 2026
Fix go-gitea#36474 It also fixed a bug when sync deleted branches.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #36474
It also fixed a bug when sync deleted branches.