Skip to content
Snippets Groups Projects
Commit b6c5d52a authored by Douwe Maan's avatar Douwe Maan
Browse files

Merge branch 'cleanup-repository-initialize' into 'master'

Cleaned up Repository#initialize

The "default_branch" argument is never used and the "project" argument
isn't optional.



See merge request !2832
parents 21fa421c f253f725
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -342,7 +342,7 @@ class Project < ActiveRecord::Base
end
 
def repository
@repository ||= Repository.new(path_with_namespace, nil, self)
@repository ||= Repository.new(path_with_namespace, self)
end
 
def commit(id = 'HEAD')
Loading
Loading
Loading
Loading
@@ -123,7 +123,7 @@ class ProjectWiki
end
 
def repository
Repository.new(path_with_namespace, default_branch, @project)
Repository.new(path_with_namespace, @project)
end
 
def default_branch
Loading
Loading
Loading
Loading
@@ -15,7 +15,7 @@ class Repository
Gitlab::Popen.popen(%W(find #{repository_downloads_path} -not -path #{repository_downloads_path} -mmin +120 -delete))
end
 
def initialize(path_with_namespace, default_branch = nil, project = nil)
def initialize(path_with_namespace, project)
@path_with_namespace = path_with_namespace
@project = project
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment