Giter Site home page Giter Site logo

Comments (6)

cjb avatar cjb commented on July 21, 2024

Thanks for filing this! Yes, ut_gittorrent should hook up git-fetch-pack to git-upload-pack over the ut_gittorrent transfer stream. I've been working on this but it's not ready yet.

Normally git-upload-pack conducts the negotiation with git-fetch-pack, then sends "PACK", then the pack itself. We'd want it to:

  • conduct the negotiation
  • at PACK, stop sending data over the stream and save it to disk instead
  • create a .torrent for that captured pack
  • tell the client what the infoHash of that torrent is
  • start sending the torrent after that

from gittorrent.

rakoo avatar rakoo commented on July 21, 2024

At first I only thought about extending ut_gittorrent for a client to ask for want and send its list of haves, but you're right, there should be a way to let git-fetch-pack and git-upload-pack negotiate exact content instead of re-implementing it.

from gittorrent.

rakoo avatar rakoo commented on July 21, 2024

Counter-argument regarding determinicity as mentioned in the HN thread: having a fetcher send the same want and have to everyone and each sender compute a pack object with those should be more deterministic than having fetcher and each sender negotiate every time

from gittorrent.

cjb avatar cjb commented on July 21, 2024

@rakoo Sorry, I'm not sure I understood that last point. Could you elaborate?

from gittorrent.

rakoo avatar rakoo commented on July 21, 2024

If a fetcher sends its want and its haves to all senders (as I was thinking in the first place), it's going to be the same for everyone, the only variable then is how git-pack-objects is implemented; if on the other hand a fetcher negotiates pack content with every sender, I feel there is more chance that the actual pack content changes, because there are more variables. But maybe it's just an illusion.

from gittorrent.

cjb avatar cjb commented on July 21, 2024

Yeah, I don't think there's actually a difference between those two in the resulting packfile, but might be wrong. The only input the sender has to the negotiation is what commit they're at, which isn't changing.

from gittorrent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.