diff --git a/CHANGELOG b/CHANGELOG index 0c4d90855a524f462fec0dd33e82c29431ca3170..7af6a22f37fbbd1f8f4482c7fdbf3c643f7588f3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.5.0 (unreleased) - Add "visibility" flag to GET /projects api endpoint + - Ignore binary files in code search to prevent Error 500 (Stan Hu) - Upgrade gitlab_git to 7.2.23 to fix commit message mentions in first branch push - New UI for pagination - Fix diff comments loaded by AJAX to load comment with diff in discussion tab diff --git a/app/models/repository.rb b/app/models/repository.rb index d9ff71c01eddf5b7067fa9130892e0cee16b3033..9e8bd91fde95f3d8fc21429dacff9d3aafa29bb5 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -598,7 +598,7 @@ class Repository def search_files(query, ref) offset = 2 - args = %W(#{Gitlab.config.git.bin_path} grep -i -n --before-context #{offset} --after-context #{offset} -e #{query} #{ref || root_ref}) + args = %W(#{Gitlab.config.git.bin_path} grep -i -I -n --before-context #{offset} --after-context #{offset} -e #{query} #{ref || root_ref}) Gitlab::Popen.popen(args, path_to_repo).first.scrub.split(/^--$/) end