lib/gitlab_git/compare.rb in gitlab_git-10.6.7 vs lib/gitlab_git/compare.rb in gitlab_git-10.6.8
- old
+ new
@@ -1,12 +1,13 @@
module Gitlab
module Git
class Compare
- attr_reader :head, :base
+ attr_reader :head, :base, :straight
- def initialize(repository, base, head)
+ def initialize(repository, base, head, straight = false)
@repository = repository
+ @straight = straight
unless base && head
@commits = []
return
end
@@ -32,9 +33,10 @@
unless @head && @base
return Gitlab::Git::DiffCollection.new([])
end
paths = options.delete(:paths) || []
+ options[:straight] = @straight
Gitlab::Git::Diff.between(@repository, @head.id, @base.id, options, *paths)
end
end
end
end