Hi Gábor, On Sat, 26 Oct 2019, SZEDER Gábor wrote: > On Fri, Oct 25, 2019 at 06:08:57PM -0700, Jonathan Nieder wrote: > > > Users can discover commands and their brief usage by running 'git help > > > git' or 'git help -a'; both of these pages list all available commands > > > based on the contents of 'command-list.txt'. That means adding a new > > > command there is an important part of the new command process, and > > > therefore belongs in the new command tutorial. > > > > Makes sense. > > > > Not about this patch: is there a way to detect this automatically? > > E.g. if a command in git.c::commands doesn't appear in > > command-list.txt, could we make Git fail "make test"? > > We almost detect this already: > > $ sed -i -e '/^git-bisect/d' command-list.txt > $ make check-docs > make -C Documentation lint-docs > make[1]: Entering directory '/home/szeder/src/git/Documentation' > GEN cmd-list.made > GEN doc.dep > make[2]: Entering directory '/home/szeder/src/git' > make[2]: 'GIT-VERSION-FILE' is up to date. > make[2]: Leaving directory '/home/szeder/src/git' > make[2]: Entering directory '/home/szeder/src/git' > make[2]: 'GIT-VERSION-FILE' is up to date. > make[2]: Leaving directory '/home/szeder/src/git' > LINT lint-docs > make[1]: Leaving directory '/home/szeder/src/git/Documentation' > no link: git-bisect > $ echo $? > 0 > > See that last "no link: git-bisect" line? That's what happened to > catch my eyes when Derrick forgot to add his new 'sparse-checkout' > builtin to 'command-list.txt'. I still haven't looked up what that > 'no link' is supposed to mean, but if it were an error, then we would > have surely detected the missing entry in 'command-list.txt' in out CI > builds. FWIW I think the only reason that this is not an error in `check-docs` (which _is_ run by our CI/PR builds, in the `Documentation` job) is that it used to be buggy. However, I think I managed to address the remaining issues in `js/misc-doc-fixes` (and maybe there were a couple spill-overs into `js/check-docs-exe`). In short: I think we can make this type of issue trigger an error in `check-docs` now (as in: non-zero exit code). Ciao, Dscho > > Another possibility would be to auto-generate that long list of > 'cmd_foo()' function declaration in 'builtin.h' from > 'command-list.txt', by adding a 'builtin' attribute to mark builtin > commands. > >