phacility/phabricator · error · DiffusionCommitHookRejectException

COMMIT AFFECTS TOO MANY PATHS This repository ("%s") is conf

Error message

COMMIT AFFECTS TOO MANY PATHS
This 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.

What it means

Error "COMMIT AFFECTS TOO MANY PATHS This 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.

Source

Thrown at src/applications/diffusion/engine/DiffusionCommitHookEngine.php:1332

    foreach ($content_updates as $update) {
      $identifier = $update->getRefNew();

      $sizes = $this->getFileSizesForCommit($identifier);
      if (count($sizes) > $limit) {
        $message = pht(
          'COMMIT AFFECTS TOO MANY PATHS'.
          "\n".
          'This 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.',
          $repository->getDisplayName(),
          $identifier,
          phutil_count($sizes),
          new PhutilNumber($limit));

        throw new DiffusionCommitHookRejectException($message);
      }
    }
  }

  public function getFileSizesForCommit($identifier) {
    if (!isset($this->filesizeCache[$identifier])) {
      $file_sizes = $this->loadFileSizesForCommit($identifier);
      $this->filesizeCache[$identifier] = $file_sizes;
    }

    return $this->filesizeCache[$identifier];
  }

  private function loadFileSizesForCommit($identifier) {
    $repository = $this->getRepository();

    return id(new DiffusionLowLevelFilesizeQuery())
      ->setRepository($repository)

View on GitHub (pinned to 5720a38cfe)

When it happens

Trigger: Thrown at src/applications/diffusion/engine/DiffusionCommitHookEngine.php:1332 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/4136621eba7939b6. Report an issue: GitHub.