Browse Source

RepoInit Respect AlternateDefaultBranch (#12746)

mj-v1.14.3
6543 2 years ago
committed by GitHub
parent
commit
ad2bf376df
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      modules/repository/create.go

4
modules/repository/create.go

@ -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,

Loading…
Cancel
Save