| 700 | } |
| 701 | |
| 702 | static void list_builtins(struct string_list *out, |
| 703 | unsigned int include_option, |
| 704 | unsigned int exclude_option) |
| 705 | { |
| 706 | if (include_option && exclude_option) |
| 707 | BUG("'include_option' and 'exclude_option' are mutually exclusive"); |
| 708 | for (size_t i = 0; i < ARRAY_SIZE(commands); i++) { |
| 709 | if (include_option && !(commands[i].option & include_option)) |
| 710 | continue; |
| 711 | if (exclude_option && (commands[i].option & exclude_option)) |
| 712 | continue; |
| 713 | string_list_append(out, commands[i].cmd); |
| 714 | } |
| 715 | } |
| 716 | |
| 717 | void load_builtin_commands(const char *prefix, struct cmdnames *cmds) |
| 718 | { |
no test coverage detected