mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 00:20:25 +08:00 
			
		
		
		
	RepoInit Respect AlternateDefaultBranch (#12746)
This commit is contained in:
		@@ -23,6 +23,10 @@ func CreateRepository(doer, u *models.User, opts models.CreateRepoOptions) (_ *m
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if len(opts.DefaultBranch) == 0 {
 | 
			
		||||
		opts.DefaultBranch = setting.Repository.DefaultBranch
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	repo := &models.Repository{
 | 
			
		||||
		OwnerID:                         u.ID,
 | 
			
		||||
		Owner:                           u,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user