grep with --exclude was resulting in hits on files with names like 'app/models/.svn/text-base/reading_list.rb.svn-base'. Piping through an additional grep process seems a little wasteful, but it does the job for folks who have an app on Subversion.
This commit is contained in:
parent
56b03373a8
commit
7a69f41cb5
@ -378,9 +378,9 @@ module Rails
|
|||||||
value = ""
|
value = ""
|
||||||
# Specifically double quote for finding 'test_help'
|
# Specifically double quote for finding 'test_help'
|
||||||
command = if double_quote
|
command = if double_quote
|
||||||
"grep -r #{"-P" if perl_regex} --exclude=\*.svn\* \"#{text}\" #{where}"
|
"grep -r #{"-P" if perl_regex} \"#{text}\" #{where} | grep -v \.svn"
|
||||||
else
|
else
|
||||||
"grep -r #{"-P" if perl_regex} --exclude=\*.svn\* '#{text}' #{where}"
|
"grep -r #{"-P" if perl_regex} '#{text}' #{where} | grep -v \.svn"
|
||||||
end
|
end
|
||||||
|
|
||||||
Open3.popen3(command) do |stdin, stdout, stderr|
|
Open3.popen3(command) do |stdin, stdout, stderr|
|
||||||
|
Loading…
Reference in New Issue
Block a user