diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-03-17 12:59:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-17 12:59:42 +0800 |
commit | ebbcf6fe12151394d18bc1f04a6a25c9ab0627d5 (patch) | |
tree | 6ed63b1cc9798368b9af781c138c765c36caacbf /cmd/serv.go | |
parent | 3cf0e513e68509558e135cfaea5cdc8fecc7f7c5 (diff) | |
download | gitea-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.go | 6 |
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 |