Initialize @statuses in status rather than constructor
Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7034#note_17742312
This commit is contained in:
parent
1ae557c106
commit
0902ba524f
1 changed files with 2 additions and 1 deletions
|
@ -57,7 +57,6 @@ class Commit
|
|||
|
||||
@raw = raw_commit
|
||||
@project = project
|
||||
@statuses = {}
|
||||
end
|
||||
|
||||
def id
|
||||
|
@ -231,6 +230,8 @@ class Commit
|
|||
end
|
||||
|
||||
def status(ref = nil)
|
||||
@statuses ||= {}
|
||||
|
||||
if @statuses.key?(ref)
|
||||
@statuses[ref]
|
||||
elsif ref
|
||||
|
|
Loading…
Reference in a new issue