lib/gitlab_git/compare.rb in gitlab_git-10.4.4 vs lib/gitlab_git/compare.rb in gitlab_git-10.4.5

- old
+ new

@@ -4,10 +4,13 @@ attr_reader :head, :base def initialize(repository, base, head) @repository = repository - return unless base && head + 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