Commit 0902ba52 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Initialize @statuses in status rather than constructor

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7034#note_17742312
parent 1ae557c1
...@@ -57,7 +57,6 @@ class Commit ...@@ -57,7 +57,6 @@ class Commit
@raw = raw_commit @raw = raw_commit
@project = project @project = project
@statuses = {}
end end
def id def id
...@@ -231,6 +230,8 @@ class Commit ...@@ -231,6 +230,8 @@ class Commit
end end
def status(ref = nil) def status(ref = nil)
@statuses ||= {}
if @statuses.key?(ref) if @statuses.key?(ref)
@statuses[ref] @statuses[ref]
elsif ref elsif ref
......
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