Re: [PATCH v2 3/6] generate-cmdlist.sh: keep all information in common-cmds.h
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Apr 16, 2018, 15:43 UTC
- Message-ID
- <CACsJy8DHRjtWOC+Mt=gW95-UuyswHmGMM=eM0rFguQXeAsoZyA@mail.gmail.com>
- In-Reply-To
- <xmqq36zvy8a5.fsf@gitster-ct.c.googlers.com>
On Mon, Apr 16, 2018 at 8:28 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 20 quoted lines
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
>
>> @@ -23,28 +36,44 @@ sed -n '
>> ' "$1"
>> printf '};\n\n'
>>
>> +echo "#define GROUP_NONE 0xff /* no common group */"
>
> Some later code forgets about this value, and causes "git<ENTER>" to
> segfault at the end of this entire series.
>
> Namely, here:
>
>> - for (i = 0; i < ARRAY_SIZE(common_cmds); i++) {
>> + for (i = 0; i < nr; i++) {
>> if (common_cmds[i].group != current_grp) {
>> printf("\n%s\n", _(common_cmd_groups[common_cmds[i].group]));
>> current_grp = common_cmds[i].group;
>
> where common_cmd_groups[] gets overrun.Argh!! I thought I tested everything. Sorry for the sloppy quality.
> > Here is a squash I'll queue on top to keep the tip of 'pu' at least > buildable.
Thanks. It's actually interesting that we have main porcelain commands that belong to no group. I'll try to classify them so that they show up as well.
-- Duy