Skip to content

Fix mirror bug #33597

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

Merged
merged 4 commits into from
Feb 15, 2025
Merged

Fix mirror bug #33597

merged 4 commits into from
Feb 15, 2025

Conversation

ericLemanissier
Copy link
Contributor

follows-up be4e961

This is the same modification as be4e961 but for force-pushes.
It is needed, because git fetch reveals force pushes for github mirrors:

$ git fetch --tags origin
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 9 (delta 5), reused 8 (delta 5), pack-reused 0 (from 0)
Unpacking objects: 100% (9/9), 1.70 KiB | 12.00 KiB/s, done.
From https://github.com/conan-io/conan-center-index
   729f0f1b8f..48184eddeb  refs/pull/26595/head  -> refs/pull/26595/head
 + 0c31ab60a3...1283cca9e7 refs/pull/26595/merge -> refs/pull/26595/merge  (forced update)

Fix #33200

PS: I did not test the modification, but it is the exact same change as the last hunk in https://github.com/go-gitea/gitea/pull/33224/files#diff-bb5cdb90db0f0e7f6716c0e6d0b9cbb67f08d82052b03ab3a7b5e23a1d76aed7 , just moved to the previous case of the switch

I think it could and should be back-ported to 1.23

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 14, 2025
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Feb 14, 2025
@ericLemanissier ericLemanissier changed the title Patch 1 Fix mirror bug Feb 14, 2025
@ericLemanissier
Copy link
Contributor Author

CC original PR participants: @lunny as author, and @delvh and @wxiaoguang as reviewers

@wxiaoguang
Copy link
Contributor

The logic becomes more complex, could there be some tests to cover the behavior?

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 14, 2025
@pull-request-size pull-request-size bot added size/M and removed size/S labels Feb 14, 2025
@lunny lunny added the backport/v1.23 This PR should be backported to Gitea 1.23 label Feb 14, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 15, 2025
@lunny lunny added type/bug reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. labels Feb 15, 2025
@wxiaoguang wxiaoguang merged commit 57997f1 into go-gitea:main Feb 15, 2025
26 checks passed
@GiteaBot GiteaBot added this to the 1.24.0 milestone Feb 15, 2025
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 15, 2025
@ericLemanissier ericLemanissier deleted the patch-1 branch February 15, 2025 12:22
GiteaBot added a commit to GiteaBot/gitea that referenced this pull request Feb 15, 2025
follows-up be4e961

Fix go-gitea#33200

---------

Co-authored-by: Giteabot <[email protected]>
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Feb 15, 2025
lunny pushed a commit that referenced this pull request Feb 16, 2025
Backport #33597 by @ericLemanissier

follows-up be4e961

This is the same modification as
be4e961
but for force-pushes.
It is needed, because `git fetch` reveals force pushes for github
mirrors:
```
$ git fetch --tags origin
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 9 (delta 5), reused 8 (delta 5), pack-reused 0 (from 0)
Unpacking objects: 100% (9/9), 1.70 KiB | 12.00 KiB/s, done.
From https://github.com/conan-io/conan-center-index
   729f0f1b8f..48184eddeb  refs/pull/26595/head  -> refs/pull/26595/head
 + 0c31ab60a3...1283cca9e7 refs/pull/26595/merge -> refs/pull/26595/merge  (forced update)
```

Fix #33200

PS: I did not test the modification, but it is the exact same change as
the last hunk in
https://github.com/go-gitea/gitea/pull/33224/files#diff-bb5cdb90db0f0e7f6716c0e6d0b9cbb67f08d82052b03ab3a7b5e23a1d76aed7
, just moved to the previous case of the switch

Co-authored-by: ericLemanissier <[email protected]>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 17, 2025
* giteaofficial/main:
  Add API to support link package to repository and unlink it (go-gitea#33481)
  [skip ci] Updated translations via Crowdin
  Update JS and PY dependencies (go-gitea#33587)
  [chore] add git mailmap for proper attribution of authorship (go-gitea#33612)
  Move commits signature and verify functions to service layers (go-gitea#33605)
  add spacing between sign in button's icon and text (go-gitea#33609)
  enable literal string for code search (go-gitea#33590)
  [skip ci] Updated translations via Crowdin
  Artifacts download api for artifact actions v4 (go-gitea#33510)
  Fix bug when get commit (go-gitea#33602)
  Fix mirror bug (go-gitea#33597)
  Fix typo in HTML attribute (go-gitea#33599)
  Use default Git timeout when checking repo health (go-gitea#33593)
  Improve commits list performance to reduce unnecessary database queries (go-gitea#33528)
  Performance optimization for pull request files loading comments attachments (go-gitea#33585)
  Fix PR's target branch dropdown (go-gitea#33589)
project-mirrors-bot-tu bot pushed a commit to project-mirrors/forgejo-as-gitea-fork that referenced this pull request Feb 27, 2025
follows-up be4e961

Fix go-gitea#33200

---------

Co-authored-by: Giteabot <[email protected]>
(cherry picked from commit 57997f1)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators May 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/v1.23 This PR should be backported to Gitea 1.23 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

github mirrors cause hudge slow-down
5 participants