diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-05-20 22:56:23 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-05-20 22:56:23 +0300 |
commit | f9cf65a6c4c8dfb94636f95fffa3ffa7176a31ef (patch) | |
tree | 9fce9092767789ff5600cd1cda4676871e58c078 /app | |
parent | 5d031c868a503300a23d2119b6183f263b735f04 (diff) | |
parent | ce3958ebae0332ddc295c7fe234b6a8af6f25da8 (diff) |
Merge branch 'rs-issue-3055' into 'master'
Use extended regexp flag for `git grep`-ing files
Closes #3055
See merge request !4203
Diffstat (limited to 'app')
-rw-r--r-- | app/models/repository.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 3716ea6ad6c..ca62fbbdf04 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -854,7 +854,7 @@ class Repository def search_files(query, ref) offset = 2 - args = %W(#{Gitlab.config.git.bin_path} grep -i -I -n --before-context #{offset} --after-context #{offset} -e #{Regexp.escape(query)} #{ref || root_ref}) + 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(/^--$/) end |