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

Increase minimal required git version to 2.0 #19577

Merged
merged 3 commits into from
May 2, 2022

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented May 2, 2022

Close #19554

This PR only upgrades the GitVersionRequired variable to 2.0.0. All code for git 1.x are not changed, then if some users want to test with old git client or bypass the check, they still have a chance to edit the GitVersionRequired manually.

Code for git 1.x could be removed in a separate PR before 1.17 frozen.

And since there are a lot of CentOS 7 users, a friendly hint is added to tell them how to install latest git client.

⚠️ BREAKING ⚠️

This PR makes Gitea require git >= 2.0, follow https://git-scm.com/download/ to install latest git client if your git is too old.

@wxiaoguang wxiaoguang added type/refactoring Existing code has been cleaned up. There should be no new functionality. pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! labels May 2, 2022
@wxiaoguang wxiaoguang added this to the 1.17.0 milestone May 2, 2022
modules/git/git.go Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label May 2, 2022
@lunny
Copy link
Member

lunny commented May 2, 2022

We need also update documentation. from-binary.en-us.md

@wxiaoguang
Copy link
Contributor Author

We need also update documentation. from-binary.en-us.md

Where? I didn't see hard-coded git version in that document, and I think we shouldn't put hard-coded version into it either .... the error message is clear enough when gitea is running.

@wxiaoguang
Copy link
Contributor Author

Or do you mean to change the line from

Check that Git is installed on the server. If it is not, install it first.

to

Check that Git is installed on the server. If it is not, install it first. Gitea requires Git version >= 2.0.

??

@6543
Copy link
Member

6543 commented May 2, 2022

I think there are more version checks we now can remove

@wxiaoguang
Copy link
Contributor Author

@lunny document is updated.

@6543 I prefer to keep the old code for git 1.x at the moment (in case someone still needs it). If everything works fine, the old code for git 1.x could be removed in a separate PR before 1.17 frozen.

@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 May 2, 2022
@lunny lunny merged commit 509d811 into go-gitea:main May 2, 2022
@wxiaoguang wxiaoguang deleted the upgrade-git-required-version branch May 2, 2022 12:45
zjjhot added a commit to zjjhot/gitea that referenced this pull request May 3, 2022
* giteaofficial/main:
  Fix some slice problems (incorrect slice length) (go-gitea#19592)
  Fix sending empty notifications (go-gitea#19589)
  Handle the error of a missing blob object fix go-gitea#19530 (go-gitea#19552)
  Remove legacy `+build:` constraint (go-gitea#19582)
  Federation: return useful statistic information for nodeinfo (go-gitea#19561)
  Upgrade required git version to 2.0 (go-gitea#19577)
  add smtp password to install page (go-gitea#17564)
  ignore DNS error when doing migration allow/block check (go-gitea#19566)
  [skip ci] Updated translations via Crowdin
  Dont overwrite err with nil & rename PullCheckingFuncs to reflect there usage (go-gitea#19572)
  Improve UI on mobile (go-gitea#19546)
  Add API to check if team has repo access (go-gitea#19540)
@zeripath zeripath changed the title Upgrade required git version to 2.0 Increase required git version to 2.0 Jun 19, 2022
@zeripath zeripath changed the title Increase required git version to 2.0 Increase minimal required git version to 2.0 Jun 19, 2022
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 24, 2022
* Upgrade required git version to 2.0

* update document
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 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. pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! 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.

[Proposal] Drop git 1.x support, or fix the IsEmpty bug
5 participants