GitLab steht aufgrund wichtiger Wartungsarbeiten am Montag, den 8. März, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit 4ed23a3a authored by Lin Jen-Shin's avatar Lin Jen-Shin

So that st_commits could never be nil

parent 6987ec29
......@@ -30,6 +30,10 @@ def self.select_without_diff
select(column_names - ['st_diffs'])
end
def st_commits
super || []
end
# Collect information about commits and diff from repository
# and save it to the database as serialized data
def save_git_content
......@@ -83,7 +87,7 @@ def raw_diffs(options = {})
end
def commits
@commits ||= load_commits(st_commits || [])
@commits ||= load_commits(st_commits)
end
def reload_commits
......@@ -120,10 +124,8 @@ def head_commit
def commits_sha
if @commits
commits.map(&:sha)
elsif st_commits
st_commits.map { |commit| commit[:id] }
else
[]
st_commits.map { |commit| commit[:id] }
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