Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.1 on 2022-01-26 at 16:00 UTC+1 (a few minutes of down time)

Commit f253f725 authored by Yorick Peterse's avatar Yorick Peterse
Browse files

Cleaned up Repository#initialize

The "default_branch" argument is never used and the "project" argument
isn't optional.
parent 37dacd01fce2
...@@ -342,7 +342,7 @@ def team ...@@ -342,7 +342,7 @@ def team
end end
def repository def repository
@repository ||= Repository.new(path_with_namespace, nil, self) @repository ||= Repository.new(path_with_namespace, self)
end end
def commit(id = 'HEAD') def commit(id = 'HEAD')
......
...@@ -123,7 +123,7 @@ def search_files(query) ...@@ -123,7 +123,7 @@ def search_files(query)
end end
def repository def repository
Repository.new(path_with_namespace, default_branch, @project) Repository.new(path_with_namespace, @project)
end end
def default_branch def default_branch
......
...@@ -15,7 +15,7 @@ def self.clean_old_archives ...@@ -15,7 +15,7 @@ def self.clean_old_archives
Gitlab::Popen.popen(%W(find #{repository_downloads_path} -not -path #{repository_downloads_path} -mmin +120 -delete)) Gitlab::Popen.popen(%W(find #{repository_downloads_path} -not -path #{repository_downloads_path} -mmin +120 -delete))
end end
def initialize(path_with_namespace, default_branch = nil, project = nil) def initialize(path_with_namespace, project)
@path_with_namespace = path_with_namespace @path_with_namespace = path_with_namespace
@project = project @project = project
end end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment