lib/gitlab_git/repository.rb in gitlab_git-8.2.0 vs lib/gitlab_git/repository.rb in gitlab_git-9.0.0
- old
+ new
@@ -318,12 +318,10 @@
# Return an array of Diff objects that represent the diff
# between +from+ and +to+. See Diff::filter_diff_options for the allowed
# diff options. The +options+ hash can also include :break_rewrites to
# split larger rewrites into delete/add pairs.
def diff(from, to, options = {}, *paths)
- diff_patches(from, to, options, *paths).map do |p|
- Gitlab::Git::Diff.new(p)
- end
+ DiffCollection.new(diff_patches(from, to, options, *paths), options)
end
# Return the diff between +from+ and +to+ in a single patch string. The
# +options+ hash has the same allowed keys as #diff.
def diff_text(from, to, options = {}, *paths)