You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)",
Screenshots
No response
The text was updated successfully, but these errors were encountered:
wolfogre
added
type/feature
Completely new functionality. Can only be merged if feature freeze is not active.
type/proposal
The new feature has not been accepted yet but needs to be discussed first.
labels
Aug 26, 2022
The problem is far worse than what you expected:
I just did a search where master is still used (ag 'master' | wc -l), and there are 555 instances where we still use master (some are false positives, however).
The worst thing: There is even a bug I found in cmd/hook.go where we still default to master instead of main!
I just did a search where master is still used (ag 'master' | wc -l), and there are 555 instances where we still use master (some are false positives, however).
There are some cases for the master still being used:
test code (most cases)
wiki (wiki code hard-coded the master branch name)
mirror/pull/push (master and main are processed together)
the post-receive hook (below)
The worst thing: There is even a bug I found in cmd/hook.go where we still default to master instead of main!
The logic is if wasEmpty && masterPushed: then set default branch to master, it looks safe and I think it could be consider as a fallback for users who still uses "master" branch name.
I did some tests about creating an empty repo with master as the default branch and push the a git repo with main branch into it, I think in most cases it works fine. If we still need the logic like if wasEmpty && masterPushed, the related code could also be improved to cover the main branch name.
Feature Description
Gitea tends to use main as the default branch now according to #19354, shall we update the API doc or wait until main is more popular?
gitea/templates/swagger/v1_json.tmpl
Line 3455 in 6c4688e
Screenshots
No response
The text was updated successfully, but these errors were encountered: