Skip to content

loader: Add support for dumb HTTP transfer protocol

Git supports two HTTP based transfer protocols to exchange data between two repositories: the dumb protocol and the smart protocol.

Nowadays, the smart protocol is a common method of transferring data because it is more efficient but there is still some git servers in the wild (mostly cgit) that only support the dumb protocol.

Unfortunately the dulwich package does not support such protocol so this kind of git repository could not be loaded into the archive.

That commit adds support to load such git repository by fetching objects according to the dumb HTTP transfer protocol specification.

Below are some useful resources on the subject:

I have successfully tested the loading with numerous git repositories only supporting dumb protocol, below are some of them found by inspecting the failed save code now requests for git in production:

Debian packaging has also been successfully tested, git must added as build dependency though as it is used in newly added test suite.

Related to #2489 (closed)

Test Plan

A new test suite for the dumb protocol support has been added. The sample repository used in tests is bare cloned and served by a local HTTP server as specified by the dumb protocol.


Migrated from D6342 (view on Phabricator)

Merge request reports

Loading