Skip to content

Commit ebbcf6f

Browse files
authored
Allow push to init a wiki repo (#1279)
* allow push to init a wiki repo * compact error check
1 parent 3cf0e51 commit ebbcf6f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/serv.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,12 @@ func runServ(c *cli.Context) error {
296296
gitcmd = exec.Command(verb, repoPath)
297297
}
298298

299+
if isWiki {
300+
if err = repo.InitWiki(); err != nil {
301+
fail("Internal error", "Failed to init wiki repo: %v", err)
302+
}
303+
}
304+
299305
os.Setenv(models.ProtectedBranchRepoID, fmt.Sprintf("%d", repo.ID))
300306

301307
gitcmd.Dir = setting.RepoRootPath

0 commit comments

Comments
 (0)