help: add "-a --verbose" to list all commands with synopsis

This lists all recognized commands [1] by category. The group order
follows closely git.txt.

[1] We may actually show commands that are not built (e.g. if you set
NO_PERL you don't have git-instaweb but it's still listed here). I
ignore the problem because on Linux a git package could be split
anyway. The "git-core" package may not contain git-instaweb even if
it's built because it may end up in a separate package. We can't know
anyway.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2018-05-20 20:40:01 +02:00
committed by Junio C Hamano
parent 3c7777672b
commit 63eae83f8f
5 changed files with 37 additions and 1 deletions

2
help.h
View File

@ -19,6 +19,8 @@ static inline void mput_char(char c, unsigned int num)
}
extern void list_common_cmds_help(void);
extern void list_all_cmds_help(void);
extern void list_all_main_cmds(struct string_list *list);
extern void list_all_other_cmds(struct string_list *list);
extern void list_cmds_by_category(struct string_list *list,