# File lib/gitlab_git/compare.rb, line 6 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