2020-03-13 15:44:24 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module CachedCommit
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
def to_hash
|
2023-03-04 22:38:38 +05:30
|
|
|
Gitlab::Git::Commit::SERIALIZE_KEYS.index_with do |key|
|
|
|
|
public_send(key) # rubocop:disable GitlabSecurity/PublicSend
|
2020-03-13 15:44:24 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# We don't save these, because they would need a table or a serialised
|
|
|
|
# field. They aren't used anywhere, so just pretend the commit has no parents.
|
|
|
|
def parent_ids
|
|
|
|
[]
|
|
|
|
end
|
2023-05-27 22:25:52 +05:30
|
|
|
|
|
|
|
# These are not saved
|
|
|
|
def referenced_by
|
|
|
|
[]
|
|
|
|
end
|
2020-03-13 15:44:24 +05:30
|
|
|
end
|