aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-10-15 10:29:34 -0700
committerJunio C Hamano <gitster@pobox.com>2025-10-15 10:29:35 -0700
commitd2040579404a3442077bb6d3bb08607e0d6aa5cf (patch)
treecf2639653d19659ed1783526f5d46c9c07ef6363 /t
parentMerge branch 'ps/odb-clean-stale-wrappers' into maint-2.51 (diff)
parentdocs/gitcredentials: describe URL prefix matching (diff)
downloadgit-d2040579404a3442077bb6d3bb08607e0d6aa5cf.tar.gz
git-d2040579404a3442077bb6d3bb08607e0d6aa5cf.zip
Merge branch 'mh/doc-credential-url-prefix' into maint-2.51
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 '')
-rwxr-xr-xt/t0300-credentials.sh19
1 files changed, 15 insertions, 4 deletions
diff --git a/t/t0300-credentials.sh b/t/t0300-credentials.sh
index cb3a85c7ff..07aa834d33 100755
--- a/t/t0300-credentials.sh
+++ b/t/t0300-credentials.sh
@@ -991,18 +991,24 @@ test_expect_success 'url parser not confused by encoded markers' '
test_expect_success 'credential config with partial URLs' '
echo "echo password=yep" | write_script git-credential-yep &&
- test_write_lines url=https://user@example.com/repo.git >stdin &&
+ test_write_lines url=https://user@example.com/org/repo.git >stdin &&
for partial in \
example.com \
+ example.com/org/repo.git \
user@example.com \
+ user@example.com/org/repo.git \
https:// \
https://example.com \
https://example.com/ \
+ https://example.com/org \
+ https://example.com/org/ \
+ https://example.com/org/repo.git \
https://user@example.com \
https://user@example.com/ \
- https://example.com/repo.git \
- https://user@example.com/repo.git \
- /repo.git
+ https://user@example.com/org \
+ https://user@example.com/org/ \
+ https://user@example.com/org/repo.git \
+ /org/repo.git
do
git -c credential.$partial.helper=yep \
credential fill <stdin >stdout &&
@@ -1012,7 +1018,12 @@ test_expect_success 'credential config with partial URLs' '
for partial in \
dont.use.this \
+ example.com/o \
+ user@example.com/o \
http:// \
+ https://example.com/o \
+ https://user@example.com/o \
+ /o \
/repo
do
git -c credential.$partial.helper=yep \