uncommit uses match as argument which serves the purpose of optimizer for _fixdirstate() . This adds a similar optimization for unamend.
unamend: made match optional in firdirstate()
Also, the matcher has been optional since D5661, so the description seems wrong. The commit message should also explain the reason for the patch, unless that's obvious (things like "remove unused argument 'foo' for bar()" don't need a motivation, IMO).
The @command decorator defines what arguments that command accepts. In this case, it's an empty list (on line 167), which means it accepts no arguments.
Is there supposed to be any other way to verify it ?
You can simply run the command and see how it works. If you're in the root of the hg repo, just try this:
$ ./hg unamend foo hg unamend: invalid arguments hg unamend undo the most recent amend operation on a current changeset (use 'hg unamend -h' to show more help)
(the tests pass successfully)
I haven't checked, but I assume there are no tests for hg unamend <file> (or if there are, it still fails with the error I showed above).