diff --git a/src/configuration/ArcanistSettings.php b/src/configuration/ArcanistSettings.php --- a/src/configuration/ArcanistSettings.php +++ b/src/configuration/ArcanistSettings.php @@ -21,6 +21,14 @@ 'details.'), 'example' => '"arc:amended, arc:prompt"', ), + 'generated-paths' => array( + 'type' => 'list', + 'help' => pht( + 'Paths that are generated. These paths are not normally useful for '. + 'code review and will be shown as collapsed in the Differential UI.'), + 'default' => array(), + 'example' => '["(^src/__phutil_library_map__\\.php$)"]', + ), 'load' => array( 'type' => 'list', 'legacy' => 'phutil_libraries', diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php --- a/src/workflow/ArcanistDiffWorkflow.php +++ b/src/workflow/ArcanistDiffWorkflow.php @@ -525,6 +525,7 @@ $this->updateLintDiffProperty(); $this->updateUnitDiffProperty(); $this->updateLocalDiffProperty(); + $this->updateGeneratedDiffProperty(); $this->resolveDiffPropertyUpdates(); $output_json = $this->getArgument('json'); @@ -2411,6 +2412,18 @@ $this->updateDiffProperty('local:commits', json_encode($local_info)); } + /** + * Update generated paths for the diff. + * + * @task diffprop + */ + private function updateGeneratedDiffProperty() { + $paths = $this->getWorkingCopy()->getProjectConfig('generated-paths'); + + if ($paths) { + $this->updateDiffProperty('arc:generated', json_encode($paths)); + } + } /** * Update an arbitrary diff property.