All of lore.kernel.org
 help / color / mirror / Atom feed
From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Emily Shaffer <emilyshaffer@google.com>, git@vger.kernel.org
Subject: Re: [PATCH 1/3] myfirstcontrib: add 'psuh' to command-list.txt
Date: Sat, 26 Oct 2019 10:00:57 +0200	[thread overview]
Message-ID: <20191026080057.GP4348@szeder.dev> (raw)
In-Reply-To: <20191026010857.GA39574@google.com>

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.

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.


  reply	other threads:[~2019-10-26  8:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-26  0:51 [PATCH 0/3] some clarifications to MyFirstContribution Emily Shaffer
2019-10-26  0:51 ` [PATCH 1/3] myfirstcontrib: add 'psuh' to command-list.txt Emily Shaffer
2019-10-26  1:08   ` Jonathan Nieder
2019-10-26  8:00     ` SZEDER Gábor [this message]
2019-10-28  1:24       ` Junio C Hamano
2019-10-28 11:25         ` SZEDER Gábor
2019-10-29 20:39       ` Johannes Schindelin
2019-10-26  0:51 ` [PATCH 2/3] myfirstcontrib: add dependency installation step Emily Shaffer
2019-10-26  1:12   ` Jonathan Nieder
2019-10-28  1:27     ` Junio C Hamano
2019-10-31 20:58       ` Emily Shaffer
2019-10-26  0:51 ` [PATCH 3/3] myfirstcontrib: hint to find gitgitgadget allower Emily Shaffer
2019-10-26  1:15   ` Jonathan Nieder
2019-10-29 20:43     ` Johannes Schindelin
2019-10-27  1:39   ` Pratyush Yadav
2019-10-26  1:17 ` [PATCH 0/3] some clarifications to MyFirstContribution Jonathan Nieder
2019-10-31 21:03 ` [PATCH v2 " Emily Shaffer
2019-10-31 21:03   ` [PATCH v2 1/3] myfirstcontrib: add 'psuh' to command-list.txt Emily Shaffer
2019-10-31 21:03   ` [PATCH v2 2/3] myfirstcontrib: add dependency installation step Emily Shaffer
2019-10-31 21:03   ` [PATCH v2 3/3] myfirstcontrib: hint to find gitgitgadget allower Emily Shaffer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191026080057.GP4348@szeder.dev \
    --to=szeder.dev@gmail.com \
    --cc=emilyshaffer@google.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.