Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaco Guzman <pacoguzmanp@gmail.com>2016-07-27 20:00:34 +0300
committerPaco Guzman <pacoguzmanp@gmail.com>2016-08-03 08:00:20 +0300
commitc86c1905b5574cac234315598d8d715fcaee3ea7 (patch)
tree31ba7ab51c04b07ea70d15db88f2370f9ca6359e /lib/api/commits.rb
parent1d0c7b74920a94e488e6a2c090abb3e525438053 (diff)
switch from diff_file_collection to diffs
So we have raw_diffs too
Diffstat (limited to 'lib/api/commits.rb')
-rw-r--r--lib/api/commits.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb
index 4a11c8e3620..b4eaf1813d4 100644
--- a/lib/api/commits.rb
+++ b/lib/api/commits.rb
@@ -54,7 +54,7 @@ module API
sha = params[:sha]
commit = user_project.commit(sha)
not_found! "Commit" unless commit
- commit.diffs.to_a
+ commit.raw_diffs.to_a
end
# Get a commit's comments
@@ -96,7 +96,7 @@ module API
}
if params[:path] && params[:line] && params[:line_type]
- commit.diffs(all_diffs: true).each do |diff|
+ commit.raw_diffs(all_diffs: true).each do |diff|
next unless diff.new_path == params[:path]
lines = Gitlab::Diff::Parser.new.parse(diff.diff.each_line)