Re: [PATCH v5 3/3] bundle-uri: do not die on unresolvable relative URIs
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Nov 30, 2026, 19:11 UTC
- Message-ID
- <9fe3cdee-03a6-411f-9bdc-6885bc0ef7eb@gmail.com>
- In-Reply-To
- <20261126115803.30015-4-aniketgupta3001@gmail.com>
On 11/26/2026 6:58 AM, Aniket Gupta wrote:
Show 24 quoted lines
> diff --git a/t/t5558-clone-bundle-uri.sh b/t/t5558-clone-bundle-uri.sh > index e86ed7d30c..e7a3e17775 100755 > --- a/t/t5558-clone-bundle-uri.sh > +++ b/t/t5558-clone-bundle-uri.sh > @@ -1351,6 +1351,22 @@ test_expect_success 'bundles advertised with empty URI' ' > test_grep ! "expected packfile" err > ' > > +test_expect_success 'bundles advertised with unresolvable relative URI' ' > + git clone --no-local --mirror clone-from \ > + "$HTTPD_DOCUMENT_ROOT_PATH/bad-relative-uri.git" && > + git -C "$HTTPD_DOCUMENT_ROOT_PATH/bad-relative-uri.git" config uploadpack.advertiseBundleURIs true && > + git -C "$HTTPD_DOCUMENT_ROOT_PATH/bad-relative-uri.git" config bundle.version 1 && > + git -C "$HTTPD_DOCUMENT_ROOT_PATH/bad-relative-uri.git" config bundle.mode all && > + git -C "$HTTPD_DOCUMENT_ROOT_PATH/bad-relative-uri.git" config bundle.bundle-1.uri ../../../../../../../../bundle.bdl && > + git -C "$HTTPD_DOCUMENT_ROOT_PATH/bad-relative-uri.git" config bundle.bundle-1.creationToken 1 && > + > + git -c transfer.bundleURI=true clone \ > + "$HTTPD_URL/smart/bad-relative-uri.git" target-bad-relative-uri 2>err && > + test_grep "cannot strip one component off url" err && > + test_grep ! "has no uri" err && > + git -C target-bad-relative-uri fsck > +' > +
This is the new test in v5. LGTM.
Thanks, -Stolee