diff options
| author | M Hickford <mirth.hickford@gmail.com> | 2025-10-01 20:56:49 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-01 14:23:51 -0700 |
| commit | fdd21ba116551efb07e784f138d090917b7e70ad (patch) | |
| tree | 9f483bfb4666bebbac1764a571a37b11a5887558 /Documentation | |
| parent | a1cf0cf13ab3a659ac77b7d749d6e5b11dc0142b (diff) | |
| download | git-fdd21ba116551efb07e784f138d090917b7e70ad.tar.xz | |
docs/gitcredentials: describe URL prefix matching
Documentation was inaccurate since 9a121b0d226 (credential: handle
`credential.<partial-URL>.<key>` again, 2020-04-24)
Add tests for documented behaviour.
Signed-off-by: M Hickford <mirth.hickford@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/gitcredentials.txt | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Documentation/gitcredentials.txt b/Documentation/gitcredentials.txt index 35a7452c8f..931a33f838 100644 --- a/Documentation/gitcredentials.txt +++ b/Documentation/gitcredentials.txt @@ -133,9 +133,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"] @@ -149,11 +148,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 |
