aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-10-08 12:17:55 -0700
committerJunio C Hamano <gitster@pobox.com>2025-10-08 12:17:55 -0700
commit3aa0ced36a53b817a27844c898c0474b9c120db9 (patch)
treefee06c1a9bb03d42318a51b4ca2b05bc8c324ac7 /Documentation
parent8d3abe9f8af706baafedba4283114f94a0cda4a1 (diff)
parentfdd21ba116551efb07e784f138d090917b7e70ad (diff)
downloadgit-3aa0ced36a53b817a27844c898c0474b9c120db9.tar.gz
Merge branch 'mh/doc-credential-url-prefix'
Doc update to describe a feature that has already been implemented. * mh/doc-credential-url-prefix: docs/gitcredentials: describe URL prefix matching
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/gitcredentials.adoc15
1 files changed, 7 insertions, 8 deletions
diff --git a/Documentation/gitcredentials.adoc b/Documentation/gitcredentials.adoc
index 3337bb475d..60c2cc4ade 100644
--- a/Documentation/gitcredentials.adoc
+++ b/Documentation/gitcredentials.adoc
@@ -150,9 +150,8 @@ pattern in the config file. For example, if you have this in your config file:
username = foo
--------------------------------------
-then we will match: both protocols are the same, both hosts are the same, and
-the "pattern" URL does not care about the path component at all. However, this
-context would not match:
+then we will match: both protocols are the same and both hosts are the same.
+However, this context would not match:
--------------------------------------
[credential "https://kernel.org"]
@@ -166,11 +165,11 @@ match: Git compares the protocols exactly. However, you may use wildcards in
the domain name and other pattern matching techniques as with the `http.<URL>.*`
options.
-If the "pattern" URL does include a path component, then this too must match
-exactly: the context `https://example.com/bar/baz.git` will match a config
-entry for `https://example.com/bar/baz.git` (in addition to matching the config
-entry for `https://example.com`) but will not match a config entry for
-`https://example.com/bar`.
+If the "pattern" URL does include a path component, then this must match
+as a prefix path: the context `https://example.com/bar` will match a config
+entry for `https://example.com/bar/baz.git` but will not match a config entry for
+`https://example.com/other/repo.git` or `https://example.com/barry/repo.git`
+(even though it is a string prefix).
CONFIGURATION OPTIONS