-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Feature request - changing default branch name #9542
Comments
The first branch you push to an empty repository will become the default. |
You're given the option to initialise the repo with a readme and license, which always chooses master. |
Ok. Fairly simple thing to do - good first pr. If you want it quickly stick a bounty on bounty source. |
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions. |
Still would like this. |
Fix go-gitea#9542 Signed-off-by: Andrew Thornton <[email protected]>
* Option to set default branch at repository creation * Handle template repos with non-default master branch * Add DefaultBranch handling on creation to API Fix #9542 Signed-off-by: Andrew Thornton <[email protected]>
Is this a typo? gitea/modules/repository/generate.go Line 116 in bbd910e
|
No it's a |
@zeripath: fun that you did not notice it, i could be wrong. But before the commit it's only use one white-space with the commit two white-spaces are used. And you say that it is "Depth: 1" and not "Depth: 1" as the code says, that's why i asked if it was a typo or not, but even if the code works it could be a typo i think depending on how you see on it :) |
It's a go fmt change. |
I don't know what that means, i don't code in go language, i just think it was worth a notice :) Sorry if bother you... |
Instead of looking at the diff take a look at the file: gitea/modules/repository/generate.go Lines 115 to 118 in cf4f2cf
See how the values now align vertically. Look elsewhere in that file and you'll see various other places where there is vertical aligning. If you add an attribute to a struct initialiser or definition Go is quite opinionated on its formatting - code should and often must be formatted with gofmt. |
Right now, gitea always defaults to creating a
master
branch as the default, and the default can be changed per repo with a setting. It would be nice if we could change the default branch name so that new repos would be created with the given name, e.g. if you wanted to useprod
instead ofmaster
.The text was updated successfully, but these errors were encountered: