Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2903187
D25360.1737325841.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25360.1737325841.diff
View Options
diff --git a/src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php
@@ -23,6 +23,7 @@
return array(
'path' => 'required string',
'commit' => 'optional string',
+ 'encoding' => 'optional string',
);
}
@@ -212,18 +213,20 @@
return $this->getEmptyResult();
}
- $parser = $this->getDefaultParser();
+ $parser = $this->getDefaultParser($request);
$changes = $parser->parseDiff($raw_diff);
return $changes;
}
- private function getDefaultParser() {
+ private function getDefaultParser(ConduitAPIRequest $request) {
$drequest = $this->getDiffusionRequest();
$repository = $drequest->getRepository();
$parser = new ArcanistDiffParser();
- $try_encoding = $repository->getDetail('encoding');
+ $try_encoding = coalesce(
+ $request->getValue('encoding'),
+ $repository->getDetail('encoding'));
if ($try_encoding) {
$parser->setTryEncoding($try_encoding);
}
diff --git a/src/applications/diffusion/controller/DiffusionDiffController.php b/src/applications/diffusion/controller/DiffusionDiffController.php
--- a/src/applications/diffusion/controller/DiffusionDiffController.php
+++ b/src/applications/diffusion/controller/DiffusionDiffController.php
@@ -48,6 +48,7 @@
array(
'commit' => $drequest->getCommit(),
'path' => $drequest->getPath(),
+ 'encoding' => $request->getStr('encoding'),
));
$drequest->updateSymbolicCommit($data['effectiveCommit']);
$raw_changes = ArcanistDiffChange::newFromConduit($data['changes']);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 19, 22:30 (2 d, 8 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1114024
Default Alt Text
D25360.1737325841.diff (1 KB)
Attached To
Mode
D25360: Teach Commit View about Encoding
Attached
Detach File
Event Timeline
Log In to Comment