Welcome to mirror list, hosted at ThFree Co, Russian Federation.

diff_file.rb « concerns « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 47ea14163dc4ba2adce340b29ae1aa4ef09eb6c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

module DiffFile
  extend ActiveSupport::Concern

  def to_hash
    keys = Gitlab::Git::Diff::SERIALIZE_KEYS - [:diff]

    as_json(only: keys).merge(diff: diff).with_indifferent_access
  end
end