From: Duy Nguyen Date: Mon, 16 Apr 2018 15:43:24 GMT Subject: Re: [PATCH v2 3/6] generate-cmdlist.sh: keep all information in common-cmds.h Message-ID: In-Reply-To: On Mon, Apr 16, 2018 at 8:28 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy 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" 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