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

diff_refs.rb « diff « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 43489ae876b660a951a5f6633706d66d44ff9dc5 (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
25
26
module Gitlab
  module Diff
    class DiffRefs
      attr_reader :base_sha
      attr_reader :start_sha
      attr_reader :head_sha

      def initialize(base_sha:, start_sha: base_sha, head_sha:)
        @base_sha = base_sha
        @start_sha = start_sha
        @head_sha = head_sha
      end

      def ==(other)
        other.is_a?(self.class) &&
          base_sha == other.base_sha &&
          start_sha == other.start_sha &&
          head_sha == other.head_sha
      end

      def complete?
        start_sha && head_sha
      end
    end
  end
end