in lib/gitlab_git/repository.rb [254:273]
def search_files(query, ref = nil)
greps = []
ref ||= root_ref
populated_index(ref).each do |entry|
next if submodule?(entry)
blob = Blob.raw(self, entry[:oid])
next if blob.data.encoding == Encoding::ASCII_8BIT
blob.load_all_data!(self)
greps += build_greps(blob.data, query, ref, entry[:path])
end
greps
end