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:
Diffstat (limited to 'lib/gitlab/git/compare.rb')
-rw-r--r--lib/gitlab/git/compare.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/gitlab/git/compare.rb b/lib/gitlab/git/compare.rb
index ab5245ba7cb..c6d678c9432 100644
--- a/lib/gitlab/git/compare.rb
+++ b/lib/gitlab/git/compare.rb
@@ -42,6 +42,16 @@ module Gitlab
options[:straight] = @straight
Gitlab::Git::Diff.between(@repository, @head.id, @base.id, options, *paths)
end
+
+ def generated_files
+ return Set.new unless @base && @head
+
+ changed_paths = @repository
+ .find_changed_paths([Gitlab::Git::DiffTree.new(@base.id, @head.id)])
+ .map(&:path)
+
+ @repository.detect_generated_files(@base.id, changed_paths)
+ end
end
end
end