Skip to content
Snippets Groups Projects

CE upstream

Merged Valery Sizov requested to merge ce_upstream into master
4 files
+ 33
18
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 4
0
@@ -1064,6 +1064,10 @@ def is_ancestor?(ancestor_id, descendant_id)
end
def search_files(query, ref)
unless exists? && has_visible_content? && query.present?
return []
end
offset = 2
args = %W(#{Gitlab.config.git.bin_path} grep -i -I -n --before-context #{offset} --after-context #{offset} -E -e #{Regexp.escape(query)} #{ref || root_ref})
Gitlab::Popen.popen(args, path_to_repo).first.scrub.split(/^--$/)
Loading