Browse Source

Allow push to init a wiki repo (#1279)

* allow push to init a wiki repo

* compact error check
tags/v1.2.0-rc1
Lunny Xiao 7 years ago
parent
commit
ebbcf6fe12
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      cmd/serv.go

+ 6
- 0
cmd/serv.go View File

gitcmd = exec.Command(verb, repoPath) 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)) os.Setenv(models.ProtectedBranchRepoID, fmt.Sprintf("%d", repo.ID))


gitcmd.Dir = setting.RepoRootPath gitcmd.Dir = setting.RepoRootPath

Loading…
Cancel
Save