Re: [PATCH/RFC 3/5] generate-cmdlist.sh: keep all information in common-cmds.h
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Apr 9, 2018, 16:16 UTC
- Message-ID
- <CACsJy8DQEZ_wYWWRQLeLNwJoWhkAwN++Uaxnp=tDvCd_u4gFaQ@mail.gmail.com>
- In-Reply-To
- <CAPig+cQHzB3zLqhRmDKuYk_w8283202x80BcuH7Mu3NqL95cZQ@mail.gmail.com>
On Mon, Apr 9, 2018 at 6:59 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 25 quoted lines
> On Mon, Mar 26, 2018 at 12:55 PM, Nguyễn Thái Ngọc Duy
> <pclouds@gmail.com> wrote:
>> common-cmds.h is used to extract the list of common commands (by
>> group) and a one-line summary of each command. Some information is
>> dropped, for example command category or summary of other commands.
>> Update generate-cmdlist.sh to keep all the information. The extra info
>> will be used shortly.
>>
>> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
>> ---
>> diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh
>> @@ -2,9 +2,10 @@
>> struct cmdname_help {
>> - char name[16];
>> + char name[32];
>> char help[80];
>> - unsigned char group;
>> + unsigned int category;
>> + unsigned int group;
>> };
>> @@ -23,27 +24,50 @@ sed -n '
>> +echo "#define GROUP_NONE 0xff /* no common group */"
>> +echo "#define GROUP_ 0xff /* no common group */"
>
> Meh, this "GROUP_" alias of "GROUP_NONE" isn't so nice.Yeah. I don't want to mess too much with shell script. I wonder if we should instead kill this script and extend Documentation/cmd-list.perl to handle this task too. It would be much nicer to write and maintain the script. The downside is NO_PERL builds will have no commands in "git help".
-- Duy