{"record":{"id":"41fca571b576be55","repo":"phacility/phabricator","slug":"specify-a-commit-or-repository-to-reparse","errorCode":null,"errorMessage":"Specify a commit or repository to reparse.","messagePattern":"Specify a commit or repository to reparse\\.","errorType":"exception","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php","lineNumber":95,"sourceCode":"        ));\n\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $console = PhutilConsole::getConsole();\n\n    $all_from_repo = $args->getArg('all');\n    $reparse_message = $args->getArg('message');\n    $reparse_change = $args->getArg('change');\n    $reparse_publish = $args->getArg('publish');\n    $reparse_what = $args->getArg('revision');\n    $force = $args->getArg('force');\n    $background = $args->getArg('background');\n    $min_date = $args->getArg('min-date');\n    $importing = $args->getArg('importing');\n\n    if (!$all_from_repo && !$reparse_what) {\n      throw new PhutilArgumentUsageException(\n        pht('Specify a commit or repository to reparse.'));\n    }\n\n    if ($all_from_repo && $reparse_what) {\n      $commits = implode(', ', $reparse_what);\n      throw new PhutilArgumentUsageException(\n        pht(\n          \"Specify a commit or repository to reparse, not both:\\n\".\n          \"All from repo: %s\\n\".\n          \"Commit(s) to reparse: %s\",\n          $all_from_repo,\n          $commits));\n    }\n\n    $any_step = ($reparse_message || $reparse_change || $reparse_publish);\n\n    if ($any_step && $importing) {\n      throw new PhutilArgumentUsageException(","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementReparseWorkflow.php#L77-L113","documentation":"`bin/repository reparse` needs a subject: either `--all <repository>` (every commit in a repository) or one or more commit identifiers as wildcard arguments (`$reparse_what`). If neither is supplied the workflow has nothing to reparse and exits immediately with this PhutilArgumentUsageException.","triggerScenarios":"Bare `./bin/repository reparse` invocation, or one that only carries step flags like `--message` / `--change` / `--publish` without naming a commit or repository.","commonSituations":"Operators discovering the command and trying step flags alone; scripts that assemble the commit list dynamically and pass none.","solutions":["Name the subject: `./bin/repository reparse --all R` for a whole repository, or `./bin/repository reparse <commit-identifier> ...` (accepts monograms/identifiers resolvable by loadNamedCommits).","Review `./bin/repository reparse --help` to pair subject flags with step flags."],"exampleFix":"# before\n./bin/repository reparse --message\n# Usage exception: Specify a commit or repository to reparse.\n\n# after\n./bin/repository reparse Rabc1234 --message\n# or the whole repository\n./bin/repository reparse --all R --message","handlingStrategy":"validation","validationCode":"# Require a subject (commits or --all) before invoking reparse\n[ $#commits -gt 0 ] || [ -n \"$ALL\" ] || { echo \"reparse needs commits or --all\" >&2; exit 2; }\n./bin/repository reparse ${ALL:+--all \"$ALL\"} \"$@\" --message","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat `--all <repo>` or commit identifiers as mandatory arguments in reparse wrappers.","Keep step flags and subject flags visually grouped in runbooks to avoid dropping one half."],"tags":["php","phabricator","cli","reparse","usage-error"],"backgroundTag":"missing-cli-argument","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}