curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Git protocol support of (lib)curl.

From: Dan Fandrich via curl-library <>
Date: Tue, 5 Jan 2021 20:53:05 -0800

On Wed, Jan 06, 2021 at 11:52:35AM +0800, Hongyi Zhao via curl-users wrote:
> On Wed, Jan 6, 2021 at 8:57 AM Dan Fandrich via curl-library
> <> wrote:
> >
> > On Wed, Jan 06, 2021 at 08:29:21AM +0800, Hongyi Zhao via curl-library wrote:
> > > $ curl git://
> > > curl: (1) Protocol "git" not supported or disabled in libcurl
> > >
> > > So, any hints for the git protocol support of (lib)curl?
> >
> > I'm not sure the git: protocol is very useful without the git tool as well.
> > And, the since the git tool already implements the git protocol using libcurl,
> > I personally don't see much gain, except perhaps for the (very few) alternative
> > git implementations that might use a built-in git protocol. But, there would be
> > far too few of those to make this worthwhile. What is your use case?
> $ git clone git://...

This use case is already developed. All you need to do is run "git clone
git://..." to get libcurl to download the necessary files and use git logic to
unpack them. Since git can use http: under the hood to download files in many
cases, curl *already* has support to do this without adding anything more. What
is missing is support for unpacking files from a git repository after cloning.
That requires a lot more intelligence than a pure file transfer client should
have (e.g., pack files parsing, knowledge of tree objects, etc.) and IMHO
doesn't belong in curl. curl is about getting data onto your machine, not about
doing anything with it afterward.

Received on 2021-01-06