summaryrefslogtreecommitdiffstats
path: root/cmd/serv.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-03-17 12:59:42 +0800
committerGitHub <noreply@github.com>2017-03-17 12:59:42 +0800
commitebbcf6fe12151394d18bc1f04a6a25c9ab0627d5 (patch)
tree6ed63b1cc9798368b9af781c138c765c36caacbf /cmd/serv.go
parent3cf0e513e68509558e135cfaea5cdc8fecc7f7c5 (diff)
downloadgitea-ebbcf6fe12151394d18bc1f04a6a25c9ab0627d5.tar.gz
gitea-ebbcf6fe12151394d18bc1f04a6a25c9ab0627d5.zip
Allow push to init a wiki repo (#1279)
* allow push to init a wiki repo * compact error check
Diffstat (limited to 'cmd/serv.go')
-rw-r--r--cmd/serv.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/serv.go b/cmd/serv.go
index 925cb2a672..d9d32217c8 100644
--- a/cmd/serv.go
+++ b/cmd/serv.go
@@ -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