summaryrefslogtreecommitdiffstats
path: root/transport.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--transport.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/transport.c b/transport.c
index b6f279e92c..b4cf2c0252 100644
--- a/transport.c
+++ b/transport.c
@@ -1516,6 +1516,7 @@ int transport_fetch_refs(struct transport *transport, struct ref *refs)
int transport_get_remote_bundle_uri(struct transport *transport)
{
+ int value = 0;
const struct transport_vtable *vtable = transport->vtable;
/* Check config only once. */
@@ -1523,6 +1524,13 @@ int transport_get_remote_bundle_uri(struct transport *transport)
return 0;
transport->got_remote_bundle_uri = 1;
+ /*
+ * Don't request bundle-uri from the server unless configured to
+ * do so by the transfer.bundleURI=true config option.
+ */
+ if (git_config_get_bool("transfer.bundleuri", &value) || !value)
+ return 0;
+
if (!vtable->get_bundle_uri)
return error(_("bundle-uri operation not supported by protocol"));