blob: 7873e85a0ebb4bef2484ed3e3728d90a526b0e90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# frozen_string_literal: true
module Gitlab
module Diff
module FileCollection
class WikiPage < Base
def initialize(page, diff_options:)
commit = page.wiki.commit(page.version.commit)
diff_options = diff_options.merge(
expanded: true,
paths: [page.path]
)
super(commit,
# TODO: Uncouple diffing from projects
# https://gitlab.com/gitlab-org/gitlab/-/issues/217752
project: page.wiki,
diff_options: diff_options,
diff_refs: commit.diff_refs)
end
end
end
end
end
|