mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-28 14:43:52 +03:00
Allow push to init a wiki repo (#1279)
* allow push to init a wiki repo * compact error check
This commit is contained in:
parent
3cf0e513e6
commit
ebbcf6fe12
1 changed files with 6 additions and 0 deletions
|
@ -296,6 +296,12 @@ func runServ(c *cli.Context) error {
|
|||
gitcmd = exec.Command(verb, repoPath)
|
||||
}
|
||||
|
||||
if isWiki {
|
||||
if err = repo.InitWiki(); err != nil {
|
||||
fail("Internal error", "Failed to init wiki repo: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
os.Setenv(models.ProtectedBranchRepoID, fmt.Sprintf("%d", repo.ID))
|
||||
|
||||
gitcmd.Dir = setting.RepoRootPath
|
||||
|
|
Loading…
Reference in a new issue