Page MenuHomePhabricator

D18105.diff
No OneTemporary

D18105.diff

diff --git a/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php
@@ -57,11 +57,14 @@
$results = array();
$future = $repository->getLocalCommandFuture(
// NOTE: --perl-regexp is available only with libpcre compiled in.
- 'grep --extended-regexp --null -n --no-color -e %s %s -- %s',
- $grep,
+ 'grep --extended-regexp --null -n --no-color -f - %s -- %s',
$drequest->getStableCommit(),
$path);
+ // NOTE: We're writing the pattern on stdin to avoid issues with UTF8
+ // being mangled by the shell. See T12807.
+ $future->write($grep);
+
$binary_pattern = '/Binary file [^:]*:(.+) matches/';
$lines = new LinesOfALargeExecFuture($future);

File Metadata

Mime Type
text/plain
Expires
May 13 2024, 10:13 PM (4 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6276386
Default Alt Text
D18105.diff (973 B)

Event Timeline