initialize

in lib/gitlab_git/compare.rb [5:20]


      def initialize(repository, base, head, straight = false)
        @repository = repository
        @straight = straight

        unless base && head
          @commits = []
          return
        end

        @base = Gitlab::Git::Commit.find(repository, base.try(:strip))
        @head = Gitlab::Git::Commit.find(repository, head.try(:strip))

        @commits = [] unless @base && @head
        @commits = [] if same
      end