"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: got clone
To:
Jerome Kasper <neon.king.fr@gmail.com>
Cc:
gameoftrees@openbsd.org
Date:
Wed, 20 Nov 2019 22:31:31 +0100

Download raw body.

Thread
  • Jerome Kasper:

    got clone

    • Stefan Sperling:

      got clone

On Wed, Nov 20, 2019 at 01:04:05AM +0100, Jerome Kasper wrote:
> Hi everyone !
> I'm very glad things are going forward. I wanted to know if
> anyone is already working on some "clone" feature and if not,
> i'd like to give a try to it under some mentoring (to be sure i'm
> not doing things wrong)
> By "clone" i would mean fetching a distant repository already
> initialized with got.
> I was thinking about using something like a privilege separated
> ftp fetching and if is the wrong method, what would be the
> right one to use ?
> 
> thank you for your lights,
> greets,
> Jerome
> 
> 

Adding support for Git's protocol is not high on my list. I would first
look at creating packfiles, then repository administration tools, then
writing a gotd server as described in my eurobsdcon talk, etc.
Git compatible network protocols are "nice to have" but not essential for me.

That said, this shouldn't block anyone from trying to add support for e.g.
cloning Git repositories over HTTPS from github. That would be useful and
wouldn't collide with any other existing plans.

You could take a look at opengit to see how they implemented it:
https://github.com/khanzf/opengit.git

Ideally, any network protocol speaker would be a separate libexec helper.
So one way to start would be to extract clone support code from opengit
into a separate program which downloads all objects from a repository given
a URL and prints them. Once that works, this program could be converted
to use an imsg-based interface over a pipe to communicate with got and
pass objects to the main program which could write them to a repository.