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

Re: [PATCH 1/2] completion: take into account the formatting backticks for options

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 18, 2025, 04:16 UTC
Message-ID
<xmqq1puv55y7.fsf@gitster.g>
In-Reply-To
<2773494.mvXUDI8C0e@cayenne>
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/^.*$/	"&",/'
Previous: Jean-Noël AVILANext: Jean-Noël AVILA
Message 5 of 11 in “doc: apply new format to git-branch man page”
  1. 0/2 doc: apply new format to git-branch man pageJean-Noël Avila via GitGitGadget, Mar 15, 2025
  2. 1/2 completion: take into account the formatting backticks for optionsJean-Noël Avila via GitGitGadget, Mar 15, 2025
  3. Junio C HamanoMar 17, 2025
  4. Jean-Noël AVILAMar 18, 2025
  5. Junio C HamanoMar 18, 2025
  6. Jean-Noël AVILAMar 18, 2025
  7. 2/2 doc: apply new format to git-branch man pageJean-Noël Avila via GitGitGadget, Mar 15, 2025
  8. Junio C HamanoMar 17, 2025
  9. 0/2 doc: apply new format to git-branch man pageJean-Noël Avila via GitGitGadget, Mar 19, 2025
  10. 1/2 completion: take into account the formatting backticks for optionsJean-Noël Avila via GitGitGadget, Mar 19, 2025
  11. 2/2 doc: apply new format to git-branch man pageJean-Noël Avila via GitGitGadget, Mar 19, 2025

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.