public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: "Jean-Noël AVILA" <jn.avila@free•fr>
Cc: "Jean-Noël Avila via GitGitGadget" <gitgitgadget@gmail•com>,
	git@vger•kernel.org
Subject: Re: [PATCH 1/2] completion: take into account the formatting backticks for options
Date: Mon, 17 Mar 2025 21:16:32 -0700	[thread overview]
Message-ID: <xmqq1puv55y7.fsf@gitster.g> (raw)
In-Reply-To: <2773494.mvXUDI8C0e@cayenne> ("Jean-Noël AVILA"'s message of "Tue, 18 Mar 2025 04:58:51 +0100")

Jean-Noël AVILA <jn.avila@free•fr> writes:

> For the GNUism, the tests on MacOS and Windows by gitgitgadget passed. But I 
> get your point and will reroll.

Is there a good test in our test suite that validates the output of
this script?  I had an impression that even if the regexp match by
this grep were a bit off, the only end-user visible effect of such a
breakage is that some entries from config_name_list[] may be missing
when "git help --config-for-completion" is called, but I do not
think of any sensible way to notice that some entries are missing or
extra entries exist in the output.  So unless the regexp is broken
so badly that makes the resulting config-list.h syntactically
incorrect, it is unlikely that our test suite would catch anything,
I suspect.

If I deliberately break the regexp (this is before your patch), it
does not seem to break t0012 (which uses --config-for-completion).

 generate-configlist.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git c/generate-configlist.sh w/generate-configlist.sh
index dffdaada8b..a6eb9739ea 100755
--- c/generate-configlist.sh
+++ w/generate-configlist.sh
@@ -13,7 +13,7 @@ print_config_list () {
 	cat <<EOF
 static const char *config_name_list[] = {
 EOF
-	grep -h '^[a-zA-Z].*\..*::$' "$SOURCE_DIR"/Documentation/*config.adoc "$SOURCE_DIR"/Documentation/config/*.adoc |
+	grep -h '^[a-uA-Z].*\..*::$' "$SOURCE_DIR"/Documentation/*config.adoc "$SOURCE_DIR"/Documentation/config/*.adoc |
 	sed '/deprecated/d; s/::$//; s/,  */\n/g' |
 	sort |
 	sed 's/^.*$/	"&",/'




  reply	other threads:[~2025-03-18  4:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-15 16:31 [PATCH 0/2] doc: apply new format to git-branch man page Jean-Noël Avila via GitGitGadget
2025-03-15 16:31 ` [PATCH 1/2] completion: take into account the formatting backticks for options Jean-Noël Avila via GitGitGadget
2025-03-17 20:52   ` Junio C Hamano
2025-03-18  3:58     ` Jean-Noël AVILA
2025-03-18  4:16       ` Junio C Hamano [this message]
2025-03-18  4:27         ` Jean-Noël AVILA
2025-03-15 16:31 ` [PATCH 2/2] doc: apply new format to git-branch man page Jean-Noël Avila via GitGitGadget
2025-03-17 21:34   ` Junio C Hamano
2025-03-19  8:16 ` [PATCH v2 0/2] " Jean-Noël Avila via GitGitGadget
2025-03-19  8:16   ` [PATCH v2 1/2] completion: take into account the formatting backticks for options Jean-Noël Avila via GitGitGadget
2025-03-19  8:16   ` [PATCH v2 2/2] doc: apply new format to git-branch man page Jean-Noël Avila via GitGitGadget

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=xmqq1puv55y7.fsf@gitster.g \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitgitgadget@gmail$(echo .)com \
    --cc=jn.avila@free$(echo .)fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox