Skip to content

Allow push to init a wiki repo #1279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 17, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cmd/serv.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,13 @@ func runServ(c *cli.Context) error {
gitcmd = exec.Command(verb, repoPath)
}

if isUncyclo {
err = repo.InitUncyclo()
if err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if err := repo.InitUncyclo(); err != nil {
....
}

more readable?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also a good idea to contain them (not that it matters here, but it's good practice)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

fail("Internal error", "Failed to init wiki repo: %v", err)
}
}

os.Setenv(models.ProtectedBranchRepoID, fmt.Sprintf("%d", repo.ID))

gitcmd.Dir = setting.RepoRootPath
Expand Down