help: use command-list.h for common command list

The previous commit added code generation for all_cmd_desc[] which
includes almost everything we need to generate common command list.
Convert help code to use that array instead and drop common_cmds[] array.

The description of each common command group is removed from
command-list.txt. This keeps this file format simpler. common-cmds.h
will not be generated correctly after this change due to the
command-list.txt format change. But it does not matter and
common-cmds.h will be removed.

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-10 10:46:42 +02:00
committed by Junio C Hamano
parent f318d73915
commit cfb22a02ab
5 changed files with 122 additions and 50 deletions

View File

@@ -6,7 +6,7 @@ die () {
}
command_list () {
sed '1,/^### command list/d;/^#/d' "$1"
grep -v '^#' "$1"
}
get_categories () {
@@ -65,7 +65,7 @@ echo "/* Automatically generated by generate-cmdlist.sh */
struct cmdname_help {
const char *name;
const char *help;
uint32_t group;
uint32_t category;
};
"
if test -z "$2"