check-ref-format: handle subcommands in separate functions