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

Rename Sync2 -> Sync #26479

Merged
merged 1 commit into from
Aug 13, 2023
Merged

Rename Sync2 -> Sync #26479

merged 1 commit into from
Aug 13, 2023

Conversation

delvh
Copy link
Member

@delvh delvh commented Aug 13, 2023

The xorm Sync2 has already been deprecated in favor of Sync,
so let's do the same inside the Gitea codebase.

Command used to replace everything:

for i in $(ag Sync2 --files-with-matches); do vim $i -c ':%sno/Sync2/Sync/g' -c ':wq'; done

The xorm `Sync2` has already been deprecated in favor of `Sync`, so
let's do the same inside the Gitea codebase.

Command used to replace everything:
```sh
for i in $(ag Sync2 --files-with-matches); do vim $i -c ':%sno/Sync2/Sync/g' -c ':wq'; done
```
@delvh delvh added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Aug 13, 2023
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 13, 2023
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 13, 2023
@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 Aug 13, 2023
@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 Aug 13, 2023
@puni9869
Copy link
Member

puni9869 commented Aug 13, 2023

Just a one extreme edge case, If someone downgrade to ancient version of gitea, then go.mod will have older version, just make sure that Sync and Sync2 should be in all the go dependencies packages of xorm. Other wise it will break the whole project.

@delvh
Copy link
Member Author

delvh commented Aug 13, 2023

But how can they downgrade to an ancient version that includes this PR?`

@puni9869
Copy link
Member

puni9869 commented Aug 13, 2023

But how can they downgrade to an ancient version that includes this PR?`

Checking out older release version/tag. I do sometime.

@delvh
Copy link
Member Author

delvh commented Aug 13, 2023

Yes, but that doesn't include this PR.

@puni9869
Copy link
Member

puni9869 commented Aug 13, 2023

Yes, but that doesn't include this PR.

But if we want to backport to LTS version like ~1.19 If dependency is chaged. My case is very rear. It will not impact in regular.

@delvh
Copy link
Member Author

delvh commented Aug 13, 2023

  1. It is a refactor, we typically don't backport refactors (unless x.0 hasn't been released yet, i.e. 1.21.0 in this case)
  2. Even if we backported it down to 1.19, Sync would already exist

@puni9869
Copy link
Member

puni9869 commented Aug 13, 2023

Then we are good, You have covered my concern in point 1.
Lets rock and roll this PR 🚀

@delvh delvh added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 13, 2023
@6543 6543 merged commit e10ba5e into go-gitea:main Aug 13, 2023
23 checks passed
@GiteaBot GiteaBot added this to the 1.21.0 milestone Aug 13, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 13, 2023
@delvh delvh deleted the refactor/no-more-sync2 branch August 13, 2023 19:18
zjjhot added a commit to zjjhot/gitea that referenced this pull request Aug 14, 2023
* upstream/main: (24 commits)
  Update zh-cn documentation (go-gitea#26406)
  Fix NuGet search endpoints (go-gitea#25613)
  Fix tooltip of commit select button (go-gitea#26472)
  fix grab cursor on default column (go-gitea#26476)
  Fix storage path logic especially for relative paths (go-gitea#26441)
  Rename `Sync2` -> `Sync` (go-gitea#26479)
  Add ThreadID parameter for Telegram webhooks (go-gitea#25996)
  Fix stderr usages (go-gitea#26477)
  Use correct pull request commit link instead of a generic commit link (go-gitea#26434)
  Close stdout correctly for "git blame" (go-gitea#26470)
  Refactor tests (go-gitea#26464)
  Remove last newline from config file (go-gitea#26468)
  Add matrix to support (go-gitea#26382)
  Refactor project templates (go-gitea#26448)
  Avoiding accessing undefined mentionValues (go-gitea#26461)
  Tweak actions menu (go-gitea#26278)
  Adjust minio new sequence, now it will check whether bucket exist first and then create one if it doesn't exist (go-gitea#26420)
  Set commit id when ref used explicitly (go-gitea#26447)
  Fix 404 error when remove self from an organization (go-gitea#26362)
  Update index doc (go-gitea#26455)
  ...
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Nov 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants