lib/gitlab_git/compare.rb in gitlab_git-7.0.0.rc12 vs lib/gitlab_git/compare.rb in gitlab_git-7.0.0.rc13
- old
+ new
@@ -22,19 +22,20 @@
end
@commits = Gitlab::Git::Commit.between(repository, @base.id, @head.id)
end
- def diffs(paths = nil)
+ def diffs(paths = nil, options = {})
unless @head && @base
return []
end
# Try to collect diff only if diffs is empty
# Otherwise return cached version
if @diffs.empty? && @timeout == false
begin
- @diffs = Gitlab::Git::Diff.between(@repository, @head.id, @base.id, *paths)
+ @diffs = Gitlab::Git::Diff.between(@repository, @head.id, @base.id,
+ options, *paths)
rescue Gitlab::Git::Diff::TimeoutError => ex
@diffs = []
@timeout = true
end
end