mirror of
https://github.com/go-gitea/gitea
synced 2024-12-23 08:47:55 +01:00
The default branch in wikis must be master - therefore forcibly set the HEAD to master. Fix #13846 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
0d7cb2323f
commit
05ee88e576
@ -77,6 +77,8 @@ func InitWiki(repo *models.Repository) error {
|
||||
return fmt.Errorf("InitRepository: %v", err)
|
||||
} else if err = repo_module.CreateDelegateHooks(repo.WikiPath()); err != nil {
|
||||
return fmt.Errorf("createDelegateHooks: %v", err)
|
||||
} else if _, err = git.NewCommand("symbolic-ref", "HEAD", git.BranchPrefix+"master").RunInDir(repo.WikiPath()); err != nil {
|
||||
return fmt.Errorf("unable to set default wiki branch to master: %v", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user