Skip to content
Snippets Groups Projects
Simon Sapin's avatar
Simon Sapin authored
By default, clap only accepts app-level arguments (as opposed to sub-command
level) to be specified before a sub-command: `rhg -R ./foo log`. Specifying
them after would be rejected: `rhg log -R ./foo`.

Previously we worked around that by registering global arguments both
at the app level and on each sub-command, but that required looking
for their value in two places. It turns out that Clap has built-in support
for what we want to do, so let’s use it.

Also, Clap "settings" turn out to be either global or not too.
Let’s make `AllowInvalidUtf8` apply to sub-commands too.

Differential Revision: https://phab.mercurial-scm.org/D10080
4e4c7040
History
Name Last commit Last update