@@ -77,3 +77,9 @@ transfer.unpackLimit::
transfer.advertiseSID::
Boolean. When true, client and server processes will advertise their
unique session IDs to their remote counterpart. Defaults to false.
+
+transfer.bundleURI::
+ When set to `false` ignores any server advertisement of
+ `bundle-uri` and proceed with a "normal" clone/fetch even if
+ using bundles to bootstap is possible. Defaults to `true`,
+ i.e. bundle-uri is tried whenever a server offers it.
@@ -1,5 +1,8 @@
# Included from t573*-protocol-v2-bundle-uri-*.sh
+GIT_TEST_BUNDLE_URI=1
+export GIT_TEST_BUNDLE_URI
+
T5730_PARENT=
T5730_URI=
T5730_BUNDLE_URI=
@@ -1529,6 +1529,7 @@ int transport_fetch_refs(struct transport *transport, struct ref *refs)
int transport_get_remote_bundle_uri(struct transport *transport, int quiet)
{
+ int value = 0;
const struct transport_vtable *vtable = transport->vtable;
/* Check config only once. */
@@ -1536,10 +1537,13 @@ int transport_get_remote_bundle_uri(struct transport *transport, int quiet)
return 0;
/*
- * This is intentionally below the transport.injectBundleURI,
- * we want to be able to inject into protocol v0, or into the
- * dialog of a server who doesn't support this.
+ * Don't use bundle-uri at all, if configured not to.
+ * This logic defaults "transfer.bundleURI" to false.
*/
+ if (!git_env_bool("GIT_TEST_BUNDLE_URI", 0) &&
+ (git_config_get_bool("transfer.bundleuri", &value) || !value))
+ return 0;
+
if (!vtable->get_bundle_uri) {
if (quiet)
return -1;