threads / patch / 64810

patchDocumentation/config: fix replacement for --get-urlmatch

Subject: [PATCH] Documentation/config: fix replacement for --get-urlmatch

## tl;dr

2 messages between Jan 15, 2026 and Jan 15, 2026. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Pushkar Singh· Jan 15, 2026, 11:08 UTC · lore
The documentation claims that --get-urlmatch is replaced by
  git config get --all --show-names --url=<URL> <name>

However, --url cannot be combined with --all, and this command fails in practice.

Update the replacement to use only --url, which matches the actual behavior of --get-urlmatch.

Signed-off-by: Pushkar Singh <pushkarkumarsingh1970@gmail.com>
---
 Documentation/git-config.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to Documentation/git-config.adoc +1 −1
diff --git a/Documentation/git-config.adoc b/Documentation/git-config.adoc
index cc054fa7e1..ac3b536a15 100644
--- a/Documentation/git-config.adoc
+++ b/Documentation/git-config.adoc
@@ -332,7 +332,7 @@ recommended to migrate to the new syntax.
 	Replaced by `git config get --all --show-names --regexp <name-regexp>`.
 
 --get-urlmatch <name> <URL>::
-	Replaced by `git config get --all --show-names --url=<URL> <name>`.
+	Replaced by `git config get --url=<URL> <name>`.
 
 --get-color <name> [<default>]::
 	Replaced by `git config get --type=color [--default=<default>] <name>`.
-- 
2.43.0
Shreyansh Paliwal· Jan 15, 2026, 21:14 UTC · re: Pushkar Singh · lore

Re: [PATCH] Documentation/config: fix replacement for --get-urlmatch

Show 28 quoted lines
> The documentation claims that --get-urlmatch is replaced by
> 
>   git config get --all --show-names --url=<URL> <name>
> 
> However, --url cannot be combined with --all, and this command
> fails in practice.
> 
> Update the replacement to use only --url, which matches the
> actual behavior of --get-urlmatch.
> 
> Signed-off-by: Pushkar Singh <pushkarkumarsingh1970@gmail.com>
> ---
>  Documentation/git-config.adoc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/git-config.adoc b/Documentation/git-config.adoc
> index cc054fa7e1..ac3b536a15 100644
> --- a/Documentation/git-config.adoc
> +++ b/Documentation/git-config.adoc
> @@ -332,7 +332,7 @@ recommended to migrate to the new syntax.
>  	Replaced by `git config get --all --show-names --regexp <name-regexp>`.
>  
>  --get-urlmatch <name> <URL>::
> -	Replaced by `git config get --all --show-names --url=<URL> <name>`.
> +	Replaced by `git config get --url=<URL> <name>`.
>  
>  --get-color <name> [<default>]::
>  	Replaced by `git config get --type=color [--default=<default>] <name>`.

Thanks for working on this, the change looks good to me. I was also looking into this based on [1] and was planning to send a similar fix, so I’m glad to see that it has been addressed.

While digging into this, I noticed that neither the documentation nor the help output currently mention that --url cannot be combined with options like --all, --default, or --regexp, even though there are checks in code to prevent that. I was thinking that might be added in a follow-up. I also had a thought that we could modify the synopsis of git config as well, showing two versions of git get, regular lookup and with --url, not sure about the plausibility of this though.

Best, Shreyansh

[1]- https://lore.kernel.org/git/CAGJzqs=0Zr2iqsTUZdjdwpbtaS7kuBOf=E_XT=vbdfyNTKkjNQ@mail.gmail.com/t/#u

← back to recent threads