On Mon, Apr 9, 2018 at 5:47 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes: >> On Mon, Mar 26, 2018 at 12:55 PM, Nguyễn Thái Ngọc Duy >> <pclouds@xxxxxxxxx> wrote: >>> + switch (category) { >>> + case CAT_ancillaryinterrogators: return _("Ancillary interrogators"); >>> + case CAT_ancillarymanipulators: return _("Ancillary manipulators"); >>> + case CAT_foreignscminterface: return _("Foreign SCM interface"); >>> + case CAT_mainporcelain: return _("Main porcelain"); >>> + case CAT_plumbinginterrogators: return _("Plumbing interrogators"); >>> + case CAT_plumbingmanipulators: return _("Plumbing interrogators"); >> >> s/interrogators"/manipulators"/ >> >>> + case CAT_purehelpers: return _("Pure helpers"); >>> + case CAT_synchelpers: return _("Sync helpers"); >>> + case CAT_synchingrepositories: return _("Synching repositories"); > > Somehow this screams "an array of strings" at me. Aren't this > CAT_things small and dense enum? Duy's modified generate-cmdlist.sh does actually output an array of strings for these, but the (generated) array is commented out in this RFC. I suppose the reason it's not presently used is because the array looks like this: static const char *cmd_categories[] = { "ancillaryinterrogators", "ancillarymanipulators", "foreignscminterface", "mainporcelain", "plumbinginterrogators", "plumbingmanipulators", "purehelpers", "synchelpers", "synchingrepositories", NULL }; which doesn't give quite the human-friendly output he'd like. The series is RFC, after all. A possible approach to fix it would be to add a new "### categories" section to command-list.txt which associates those category tags ("ancillaryinterrogators") with human-readable counterparts ("Ancillary interrogators").