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

[PATCH v2] fix: include the type flag in the cli docs

From
Matheus Felipe via GitGitGadget <gitgitgadget@gmail.com>
Date
Mar 4, 2022, 04:31 UTC
Message-ID
<pull.1220.v2.git.git.1646368313714.gitgitgadget@gmail.com>
In-Reply-To
<pull.1220.git.git.1645853661519.gitgitgadget@gmail.com>
From: Matheus Felipe <matheusfelipeog@protonmail.com>

The usage help for --type option of `git config` is missing `type` in the argument placeholder (`<>`). Add it.

Signed-off-by: Matheus Felipe <matheusfelipeog@protonmail.com>
---
    fix: include the type flag in the cli docs
    
    When the git config --global --help command is invoked, the cli
    documentation is shown in the terminal with a small error in one of the
    values of the Type group, which is the absence of the type flag in the
    --type argument:
    
    image
    [https://user-images.githubusercontent.com/50463866/155674905-01fcdf18-8f67-488a-b367-985040dfe57d.png]
    
    In the web documentation and man page:
    
    image
    [https://user-images.githubusercontent.com/50463866/155675353-4a39965a-875c-475c-829d-7849a982f5b9.png]
    image
    [https://user-images.githubusercontent.com/50463866/155675437-7283dbac-fff2-44b7-8733-7d5af375bce4.png]
    
    ------------------------------------------------------------------------
    
    Changes since v1:
    
     * Added a better commit message (as suggested by Bagas Sanjaya
       <bagasdotme@gmail.com>)
    
    ------------------------------------------------------------------------
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1220%2Fmatheusfelipeog%2Ffix%2Fgit-config-docs-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1220/matheusfelipeog/fix/git-config-docs-v2
Pull-Request: https://github.com/git/git/pull/1220
Range-diff vs v1:
 1:  7bc0abde8ff ! 1:  1550d29f5da fix: include the type flag in the cli docs
     @@ Metadata
       ## Commit message ##
          fix: include the type flag in the cli docs
      
     -    When the `git config --global --help` command is invoked,
     -    the cli documentation is shown in the terminal with a small
     -    error in one of the values of the Type group, which is the
     -    absence of the type flag in the `--type` argument.
     -    This commit fixes that.
     +    The usage help for --type option of `git config` is missing `type`
     +    in the argument placeholder (`<>`). Add it.
      
          Signed-off-by: Matheus Felipe <matheusfelipeog@protonmail.com>
      
 builtin/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/config.c b/builtin/config.c
index 542d8d02b2b..2aea465466b 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -151,7 +151,7 @@ static struct option builtin_config_options[] = {
 	OPT_BIT(0, "get-color", &actions, N_("find the color configured: slot [default]"), ACTION_GET_COLOR),
 	OPT_BIT(0, "get-colorbool", &actions, N_("find the color setting: slot [stdout-is-tty]"), ACTION_GET_COLORBOOL),
 	OPT_GROUP(N_("Type")),
-	OPT_CALLBACK('t', "type", &type, "", N_("value is given this type"), option_parse_type),
+	OPT_CALLBACK('t', "type", &type, N_("type"), N_("value is given this type"), option_parse_type),
 	OPT_CALLBACK_VALUE(0, "bool", &type, N_("value is \"true\" or \"false\""), TYPE_BOOL),
 	OPT_CALLBACK_VALUE(0, "int", &type, N_("value is decimal number"), TYPE_INT),
 	OPT_CALLBACK_VALUE(0, "bool-or-int", &type, N_("value is --bool or --int"), TYPE_BOOL_OR_INT),

base-commit: dab1b7905d0b295f1acef9785bb2b9cbb0fdec84
-- 
gitgitgadget
Previous: Matheus FelipeNext: Junio C Hamano
Message 6 of 9 in “fix: include the type flag in the cli docs”
  1. fix: include the type flag in the cli docsMatheus Felipe via GitGitGadget, Feb 26, 2022
  2. Bagas SanjayaFeb 27, 2022
  3. Junio C HamanoFeb 27, 2022
  4. Ævar Arnfjörð BjarmasonFeb 28, 2022
  5. Matheus FelipeMar 4, 2022
  6. fix: include the type flag in the cli docsMatheus Felipe via GitGitGadget, Mar 4, 2022
  7. Junio C HamanoMar 4, 2022
  8. Matheus FelipeMar 4, 2022
  9. config: correct "--type" option in "git config -h" outputMatheus Felipe via GitGitGadget, Mar 4, 2022

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.