Dont init repo on every create(:repo)

This commit is contained in:
Dmitriy Zaporozhets 2013-04-01 17:27:44 +03:00
parent 541d899410
commit 9a26e9a0d6
7 changed files with 18 additions and 11 deletions

View file

@ -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.

View file

@ -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)