{"record":{"id":"4136621eba7939b6","repo":"phacility/phabricator","slug":"commit-affects-too-many-paths-this-repository-s","errorCode":null,"errorMessage":"COMMIT AFFECTS TOO MANY PATHS\nThis repository (\"%s\") is configured with a touched files limit that caps the maximum number of paths any single commit may affect. You are pushing a change (\"%s\") which exceeds this limit: it affects %s paths, but the largest number of paths any commit may affect is %s paths.","messagePattern":"COMMIT AFFECTS TOO MANY PATHS\nThis repository \\(\"(.+?)\"\\) is configured with a touched files limit that caps the maximum number of paths any single commit may affect\\. You are pushing a change \\(\"(.+?)\"\\) which exceeds this limit: it affects (.+?) paths, but the largest number of paths any commit may affect is (.+?) paths\\.","errorType":"exception","errorClass":"DiffusionCommitHookRejectException","httpStatus":null,"severity":"error","filePath":"src/applications/diffusion/engine/DiffusionCommitHookEngine.php","lineNumber":1332,"sourceCode":"    foreach ($content_updates as $update) {\n      $identifier = $update->getRefNew();\n\n      $sizes = $this->getFileSizesForCommit($identifier);\n      if (count($sizes) > $limit) {\n        $message = pht(\n          'COMMIT AFFECTS TOO MANY PATHS'.\n          \"\\n\".\n          'This repository (\"%s\") is configured with a touched files limit '.\n          'that caps the maximum number of paths any single commit may '.\n          'affect. You are pushing a change (\"%s\") which exceeds this '.\n          'limit: it affects %s paths, but the largest number of paths any '.\n          'commit may affect is %s paths.',\n          $repository->getDisplayName(),\n          $identifier,\n          phutil_count($sizes),\n          new PhutilNumber($limit));\n\n        throw new DiffusionCommitHookRejectException($message);\n      }\n    }\n  }\n\n  public function getFileSizesForCommit($identifier) {\n    if (!isset($this->filesizeCache[$identifier])) {\n      $file_sizes = $this->loadFileSizesForCommit($identifier);\n      $this->filesizeCache[$identifier] = $file_sizes;\n    }\n\n    return $this->filesizeCache[$identifier];\n  }\n\n  private function loadFileSizesForCommit($identifier) {\n    $repository = $this->getRepository();\n\n    return id(new DiffusionLowLevelFilesizeQuery())\n      ->setRepository($repository)","sourceCodeStart":1314,"sourceCodeEnd":1350,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/diffusion/engine/DiffusionCommitHookEngine.php#L1314-L1350","documentation":"Error \"COMMIT AFFECTS TOO MANY PATHS\nThis repository (\"%s\") is configured with a touched files limit that caps the maximum number of paths any single commit may affect. You are pushing a change (\"%s\") which exceeds this limit: it affects %s paths, but the largest number of paths any commit may affect is %s paths.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/diffusion/engine/DiffusionCommitHookEngine.php:1332 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}