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

Use "main" as default branch name #19354

Merged
merged 2 commits into from
Apr 9, 2022
Merged

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Apr 9, 2022

Close #19351

⚠️ BREAKING ⚠️

This changes the the default value of repository.DEFAULT_BRANCH from master to main.
If some users have to use master as the default branch name, they should set the DEFAULT_BRANCH option manually in app.ini

@wxiaoguang wxiaoguang added this to the 1.17.0 milestone Apr 9, 2022
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Apr 9, 2022
@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 Apr 9, 2022
@jolheiser jolheiser merged commit d906858 into go-gitea:main Apr 9, 2022
@jolheiser
Copy link
Member

Not sure if this is "breaking", but it likely deserves a mention on the changelog/blog for any tools that are assuming default is master.

@wxiaoguang wxiaoguang added the pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! label Apr 9, 2022
@wxiaoguang wxiaoguang deleted the use-main-default branch April 9, 2022 04:49
@wxiaoguang
Copy link
Contributor Author

Not sure if this is "breaking", but it likely deserves a mention on the changelog/blog for any tools that are assuming default is master.

Added breaking label

zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 11, 2022
* giteaofficial/main: (22 commits)
  Add logic to switch between source/rendered on Markdown (go-gitea#19356)
  Fixed registry host value. (go-gitea#19363)
  [skip ci] Updated translations via Crowdin
  Allow package linking to private repository (go-gitea#19348)
  Use "main" as default branch name (go-gitea#19354)
  Move milestone to models/issues/ (go-gitea#19278)
  Refactor CSRF protection modules, make sure CSRF tokens can be up-to-date. (go-gitea#19337)
  Remove dependent on session auth for api/v1 routers (go-gitea#19321)
  API: Search Issues, dont show 500 if filter result in empty list (go-gitea#19244)
  [skip ci] Updated translations via Crowdin
  Never use /api/v1 from Gitea UI Pages (go-gitea#19318)
  [skip ci] Updated translations via Crowdin
  Show ssh command directly in template instead of i18n translation (go-gitea#19335)
  Package registry changes (go-gitea#19305)
  [skip ci] Updated translations via Crowdin
  Add `ENABLE_SSH_LOG` to debugging problems (go-gitea#19316)
  Warn on SSH connection for incorrect configuration (go-gitea#19317)
  escape fake link
  Allow custom redirect for landing page (go-gitea#19324)
  [skip ci] Updated translations via Crowdin
  ...
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 24, 2022
* Use "main" as default branch name

* fix test code
@Alumniminium

This comment was marked as off-topic.

@wxiaoguang
Copy link
Contributor Author

why did you have to do this silly thing too? Virtue signalling is the worst.

That's nothing with virtue signalling IMO, that's the eco-system.

The Git community is doing so.

And more and more repositories and tools are using main as the default name.

Sooner or later, the main will be the default name for all git eco-system. Following the community and eco-system will reduce many pains in the future.

If you have other feasible plans, please suggest.

@jolheiser
Copy link
Member

I am going to lock this PR. Any further discussion should happen in a new issue so it's not lost to the void.

@go-gitea go-gitea locked and limited conversation to collaborators Sep 2, 2022
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!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set default branch name to "main" instead of "master".
6 participants