git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/3] myfirstcontrib: add 'psuh' to command-list.txt

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 29, 2019, 20:39 UTC
Message-ID
<nycvar.QRO.7.76.6.1910292136080.46@tvgsbejvaqbjf.bet>
In-Reply-To
<20191026080057.GP4348@szeder.dev>
Hi Gábor,
On Sat, 26 Oct 2019, SZEDER Gábor wrote:
Show 39 quoted lines
> 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

Show 7 quoted lines
>
> 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.
>
>
Previous: SZEDER GáborNext: Emily Shaffer
Message 7 of 20 in “some clarifications to MyFirstContribution”
  1. 0/3 some clarifications to MyFirstContributionEmily Shaffer, Oct 26, 2019
  2. 1/3 myfirstcontrib: add 'psuh' to command-list.txtEmily Shaffer, Oct 26, 2019
  3. Jonathan NiederOct 26, 2019
  4. SZEDER GáborOct 26, 2019
  5. Junio C HamanoOct 28, 2019
  6. SZEDER GáborOct 28, 2019
  7. Johannes SchindelinOct 29, 2019
  8. 2/3 myfirstcontrib: add dependency installation stepEmily Shaffer, Oct 26, 2019
  9. Jonathan NiederOct 26, 2019
  10. Junio C HamanoOct 28, 2019
  11. Emily ShafferOct 31, 2019
  12. 3/3 myfirstcontrib: hint to find gitgitgadget allowerEmily Shaffer, Oct 26, 2019
  13. Jonathan NiederOct 26, 2019
  14. Johannes SchindelinOct 29, 2019
  15. Pratyush YadavOct 27, 2019
  16. Jonathan NiederOct 26, 2019
  17. 0/3 some clarifications to MyFirstContributionEmily Shaffer, Oct 31, 2019
  18. 1/3 myfirstcontrib: add 'psuh' to command-list.txtEmily Shaffer, Oct 31, 2019
  19. 2/3 myfirstcontrib: add dependency installation stepEmily Shaffer, Oct 31, 2019
  20. 3/3 myfirstcontrib: hint to find gitgitgadget allowerEmily Shaffer, Oct 31, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.