void CommandRegistry::registerCommand(Command* command, StringData name, StringData oldName) {
    for (StringData key : {name, oldName}) {
        if (key.empty()) {
            continue;
        }

        auto result = _commands.try_emplace(key, command);
        invariant(result.second, str::stream() << "command name collision: " << key);
    }
}
void CommandRegistry::registerCommand(Command* command, StringData name, StringData oldName) {
    for (StringData key : {name, oldName}) {
        if (key.empty()) {
            continue;
        }

        auto result = _commands.try_emplace(key, command);
        invariant(result.second, str::stream() << "command name collision: " << key);
    }
}