We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af12f40 commit 71a0543Copy full SHA for 71a0543
services/repository/push.go
@@ -131,7 +131,7 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error {
131
if repo.IsEmpty { // Change default branch and empty status only if pushed ref is non-empty branch.
132
repo.DefaultBranch = refName
133
repo.IsEmpty = false
134
- if refName != "master" {
+ if repo.DefaultBranch != setting.Repository.DefaultBranch {
135
if err := gitRepo.SetDefaultBranch(repo.DefaultBranch); err != nil {
136
if !git.IsErrUnsupportedVersion(err) {
137
return err
0 commit comments