Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15455986
D18105.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
973 B
Referenced Files
None
Subscribers
None
D18105.id.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 31, 6:15 AM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7387089
Default Alt Text
D18105.id.diff (973 B)
Attached To
Mode
D18105: Write patterns to "git grep" on stdin instead of passing them with "-e"
Attached
Detach File
Event Timeline
Log In to Comment