diff --git a/src/applications/differential/editor/DifferentialRevisionEditor.php b/src/applications/differential/editor/DifferentialRevisionEditor.php index 37f7b29119..ee1b23ff9c 100644 --- a/src/applications/differential/editor/DifferentialRevisionEditor.php +++ b/src/applications/differential/editor/DifferentialRevisionEditor.php @@ -807,21 +807,15 @@ final class DifferentialRevisionEditor extends PhabricatorEditor { } $all_paths = array_keys($all_paths); - $path_map = id(new DiffusionPathIDQuery($all_paths))->loadPathIDs(); + $path_ids = + PhabricatorRepositoryCommitChangeParserWorker::lookupOrCreatePaths( + $all_paths); $table = new DifferentialAffectedPath(); $conn_w = $table->establishConnection('w'); $sql = array(); - foreach ($all_paths as $path) { - $path_id = idx($path_map, $path); - if (!$path_id) { - // Don't bother creating these, it probably means we're either adding - // a file (in which case having this row is irrelevant since Diffusion - // won't be querying for it) or something is misconfigured (in which - // case we'd just be writing garbage). - continue; - } + foreach ($path_ids as $path_id) { $sql[] = qsprintf( $conn_w, '(%d, %d, %d, %d)',