Premising that "arc commit" is a beautiful Workflow dedicated to svn repositories,
I tried it at work, causing the usual PHP 8.1 deprecation warning:
$ arc diff $ arc commit ERROR 8192: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated at [arcanist/src/workflow/ArcanistWorkflow.php:1520] arcanist(head=master, ref.master=e46025f7a914) #0 preg_replace(string, string, NULL) called at [<arcanist>/src/workflow/ArcanistWorkflow.php:1520] #1 ArcanistWorkflow::normalizeRevisionID(NULL) called at [<arcanist>/src/workflow/ArcanistCommitWorkflow.php:68] #2 ArcanistCommitWorkflow::run() called at [<arcanist>/scripts/arcanist.php:427] Usage Exception: Unable to identify the revision in the working copy. Use '--revision <revision_id>' to select a revision.
This bug happens at least when Arcanist does not find any related Revision ID.
It seems there is a method that always normalizes the Revision ID, but sometime that is unknown (null).
And so, NULL ends inside a preg_replace(). It's probably OK to have a normalize method that accept wild
things, including NULL. So, fixed that specific method.
Closes T15693