phacility/phabricator · warning · PhutilArgumentUsageException
Nothing specified to rebuild. Use flags to choose which iden
Error message
Nothing specified to rebuild. Use flags to choose which identities to rebuild, or "--help" for help.
What it means
rebuild-identities does nothing unless a selector flag is given: `--repository`, `--all-repositories`, `--all-identities`, or `--raw`. The workflow tracks $rebuilt_anything and, when no branch of the selection logic ran, exits with this PhutilArgumentUsageException telling the operator to choose a target.
Source
Thrown at src/applications/repository/management/PhabricatorRepositoryManagementRebuildIdentitiesWorkflow.php:191
}
$identity_list = $identities;
} else {
$identity_query = id(new PhabricatorRepositoryIdentityQuery())
->setViewer($viewer);
$identity_list = new PhabricatorQueryIterator($identity_query);
$this->logInfo(
pht('REBUILD'),
pht('Rebuilding all existing identities.'));
}
$this->rebuildIdentities($identity_list);
}
if (!$rebuilt_anything) {
throw new PhutilArgumentUsageException(
pht(
'Nothing specified to rebuild. Use flags to choose which '.
'identities to rebuild, or "--help" for help.'));
}
return 0;
}
private function rebuildCommits($commits) {
foreach ($commits as $commit) {
$needs_update = false;
$data = $commit->getCommitData();
$author = $data->getAuthorString();
$author_identity = $this->getIdentityForCommit(
$commit,
$author);View on GitHub (pinned to 5720a38cfe)
Solutions
- Add at least one selector: `--repository R` to scope to a repository, `--all-repositories` for all of them, or `--all-identities` / `--raw <string>` to pick identities directly.
- Run `./bin/repository rebuild-identities --help` to review the available selectors before composing the command.
- Prepend `--dry-run` while experimenting so the command validates arguments without writing.
Example fix
# before ./bin/repository rebuild-identities # Usage exception: Nothing specified to rebuild... # after ./bin/repository rebuild-identities --repository R --dry-run
Defensive patterns
Strategy: validation
Validate before calling
# Require at least one selector before invoking
[ -n "$REPO" ] || [ "$ALL_REPOS" = 1 ] || [ "$ALL_IDS" = 1 ] || [ -n "$RAW" ] || {
echo "rebuild-identities needs a selector flag" >&2; exit 2;
}
./bin/repository rebuild-identities ${REPO:+--repository "$REPO"} ${ALL_REPOS:+--all-repositories} ${ALL_IDS:+--all-identities} ${RAW:+--raw "$RAW"} Prevention
- Make wrapper scripts fail fast when no selector is configured.
- Use `--dry-run` while composing the command to validate flags without side effects.
When it happens
Trigger: Bare `./bin/repository rebuild-identities` with no flags, or a combination where every flag is falsy (e.g. `--repository` passed an empty value).
Common situations: Running the new command to 'see what it does'; automation that builds the command line dynamically and ends up with all selectors empty.
Related errors
- Flags "--all-repositories" and "--repository" are not compat
- Flags "--all-identities" and "--raw" are not compatible.
- Specify which subscription to invoice with %s.
- Specify a billing range with %s and %s, or use %s.
- When specifying %s or %s, you must specify both arguments to
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/e8d2e130e1707aaf.
Report an issue: GitHub.