Dont init repo on every create(:repo)
This commit is contained in:
parent
541d899410
commit
9a26e9a0d6
7 changed files with 18 additions and 11 deletions
|
@ -147,10 +147,6 @@ module CommitsHelper
|
|||
|
||||
protected
|
||||
|
||||
def no_commit_message
|
||||
"--no commit message"
|
||||
end
|
||||
|
||||
# Private: Returns a link to a person. If the person has a matching user and
|
||||
# is a member of the current @project it will link to the team member page.
|
||||
# Otherwise it will link to the person email as specified in the commit.
|
||||
|
|
|
@ -90,13 +90,17 @@ class GollumWiki
|
|||
private
|
||||
|
||||
def create_repo!
|
||||
if gitlab_shell.add_repository(path_with_namespace)
|
||||
if init_repo(path_with_namespace)
|
||||
Gollum::Wiki.new(path_to_repo)
|
||||
else
|
||||
raise CouldNotCreateWikiError
|
||||
end
|
||||
end
|
||||
|
||||
def init_repo(path_with_namespace)
|
||||
gitlab_shell.add_repository(path_with_namespace)
|
||||
end
|
||||
|
||||
def commit_details(action, message = nil, title = nil)
|
||||
commit_message = message || default_message(action, title)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue