mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-08-06 01:37:25 +08:00
Ensure that HEAD is updated to match default branch in template generation (#13948)
Fix #13912 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
@ -323,6 +323,7 @@ func initRepository(ctx models.DBContext, repoPath string, u *models.User, repo
|
||||
if err != nil {
|
||||
return fmt.Errorf("openRepository: %v", err)
|
||||
}
|
||||
defer gitRepo.Close()
|
||||
if err = gitRepo.SetDefaultBranch(repo.DefaultBranch); err != nil {
|
||||
return fmt.Errorf("setDefaultBranch: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user