You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jason Song
82728a7cec
Do not overwrite empty DefaultBranch ( #22708 )
...
Fix #21994 .
And fix #19470 .
While generating new repo from a template, it does something like
"commit to git repo, re-fetch repo model from DB, and update default
branch if it's empty".
19d5b2f922/modules/repository/generate.go (L241-L253)
Unfortunately, when load repo from DB, the default branch will be set to
`setting.Repository.DefaultBranch` if it's empty:
19d5b2f922/models/repo/repo.go (L228-L233)
I believe it's a very old temporary patch but has been kept for many
years, see:
[2d2d85bb
](https://github.com/go-gitea/gitea/commit/2d2d85bb#diff-1851799b06733db4df3ec74385c1e8850ee5aedee70b8b55366910d22725eea8 )
I know it's a risk to delete it, may lead to potential behavioral
changes, but we cannot keep the outdated `FIXME` forever. On the other
hand, an empty `DefaultBranch` does make sense: an empty repo doesn't
have one conceptually (actually, Gitea will still set it to
`setting.Repository.DefaultBranch` to make it safer).
2 years ago
..
actions
Fix ref to trigger Actions ( #22679 )
2 years ago
activities
Don't return duplicated users who can create org repo ( #22560 )
2 years ago
admin
Implement FSFE REUSE for golang files ( #21840 )
2 years ago
asymkey
Improve error report when user passes a private key ( #22726 )
2 years ago
auth
Support scoped access tokens ( #20908 )
2 years ago
avatars
Fix get system setting bug when enabled redis cache ( #22295 )
2 years ago
db
some refactor about code comments ( #20821 )
2 years ago
dbfs
Add some comments for recent code ( #22725 )
2 years ago
fixtures
Do not overwrite empty DefaultBranch ( #22708 )
2 years ago
git
Add cron method to gc LFS MetaObjects ( #22385 )
2 years ago
issues
Small refactor for loading PRs ( #22652 )
2 years ago
migrations
Implement actions ( #21937 )
2 years ago
organization
Don't return duplicated users who can create org repo ( #22560 )
2 years ago
packages
Add Conda package registry ( #22262 )
2 years ago
perm
Rename almost all Ctx functions ( #22071 )
2 years ago
project
Project links should use parent link methods ( #22587 )
2 years ago
pull
refactor some functions to support ctx as first parameter ( #21878 )
2 years ago
repo
Do not overwrite empty DefaultBranch ( #22708 )
2 years ago
secret
Secrets storage with SecretKey encrypted ( #22142 )
2 years ago
system
Set disable_gravatar/enable_federated_avatar when offline mode is true ( #22479 )
2 years ago
unit
Implement actions ( #21937 )
2 years ago
unittest
Implement actions ( #21937 )
2 years ago
user
Implement actions ( #21937 )
2 years ago
webhook
Support system hook API ( #14537 )
2 years ago
error.go
Implement FSFE REUSE for golang files ( #21840 )
2 years ago
fixture_generation.go
Implement FSFE REUSE for golang files ( #21840 )
2 years ago
fixture_test.go
Implement FSFE REUSE for golang files ( #21840 )
2 years ago
main_test.go
Implement FSFE REUSE for golang files ( #21840 )
2 years ago
migrate.go
Check primary keys for all tables and drop ForeignReference ( #21721 )
2 years ago
migrate_test.go
Check primary keys for all tables and drop ForeignReference ( #21721 )
2 years ago
org.go
refactor some functions to support ctx as first parameter ( #21878 )
2 years ago
org_team.go
Supports wildcard protected branch ( #20825 )
2 years ago
org_team_test.go
Implement FSFE REUSE for golang files ( #21840 )
2 years ago
org_test.go
Implement FSFE REUSE for golang files ( #21840 )
2 years ago
repo.go
Implement actions ( #21937 )
2 years ago
repo_collaboration.go
refactor some functions to support ctx as first parameter ( #21878 )
2 years ago
repo_collaboration_test.go
Implement FSFE REUSE for golang files ( #21840 )
2 years ago
repo_test.go
Implement FSFE REUSE for golang files ( #21840 )
2 years ago
repo_transfer.go
Always reuse transaction ( #22362 )
2 years ago
repo_transfer_test.go
Rename almost all Ctx functions ( #22071 )
2 years ago
user.go
Supports wildcard protected branch ( #20825 )
2 years ago