{"thread":{"id":"15379","subject":"How can i write a new protocol for git","startedAt":"2008-09-05T09:22:57Z","lastAt":"2008-09-08T02:32:16Z","messageCount":5,"participants":["Sky Patrick","Jakub Narebski","Mike Hommey","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"89834","messageId":"976e6d070809050222v1580ae53ye96dee913d44ae4b@mail.gmail.com","threadId":"15379","inReplyTo":null,"subject":"How can i write a new protocol for git","fromName":"Sky Patrick","fromEmail":"patricksky852@gmail.com","sentAt":"2008-09-05T09:22:57Z","receivedAt":"2008-09-05T09:22:57Z","isPatch":false,"sender":{"key":"patricksky852@gmail.com","avatar":null},"body":"Hi,\n\nIf i want to write a new protocol for file transfer and would like to\nto integrate it with git. Is it possible and easy to integrate it ?\nCurrently, i know that jgit may achieve it, but it is a Java\nimplementation and may not work with git command line program that\nwritten in C.\n\nRegards\nPatrick\n"},{"id":"89835","messageId":"m3hc8vortf.fsf@localhost.localdomain","threadId":"15379","inReplyTo":"976e6d070809050222v1580ae53ye96dee913d44ae4b@mail.gmail.com","subject":"Re: How can i write a new protocol for git","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-09-05T09:38:56Z","receivedAt":"2008-09-05T09:38:56Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"\"Sky Patrick\" <patricksky852@gmail.com> writes:\n\n> If i want to write a new protocol for file transfer and would like to\n> to integrate it with git. Is it possible and easy to integrate it ?\n> Currently, i know that jgit may achieve it, but it is a Java\n> implementation and may not work with git command line program that\n> written in C.\n\nWhat is exactly what you want to achieve? From the above it is not\nclear if you want to add support for new protocol in git (like\namazon-s3 support in JGit, or currently in the works smart HTTP\ntransport (HTTP POST)), or perhaps you want some separate application\nusing some unknown file transfer protocol to somehow integrate with\ngit; but what this integration is to be?\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"89836","messageId":"20080905094746.GA26820@glandium.org","threadId":"15379","inReplyTo":"976e6d070809050222v1580ae53ye96dee913d44ae4b@mail.gmail.com","subject":"Re: How can i write a new protocol for git","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2008-09-05T09:47:46Z","receivedAt":"2008-09-05T09:47:46Z","isPatch":false,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Fri, Sep 05, 2008 at 05:22:57PM +0800, Sky Patrick wrote:\n> Hi,\n> \n> If i want to write a new protocol for file transfer and would like to\n> to integrate it with git. Is it possible and easy to integrate it ?\n> Currently, i know that jgit may achieve it, but it is a Java\n> implementation and may not work with git command line program that\n> written in C.\n\nFirst, it would depend if you need this new protocol to be a dumb\nprotocol (like rsync and http) or \"native\" (git or ssh).\n\nI've been meaning to refactor the dumb protocol \"stack\" for a while, but\nhaven't gone much further than ideas in my mind (i.e. no code). I also\nhave some start of http code recfactoring, that is waiting for this dumb\nprotocol rework to be completed.\n\nMike\n"},{"id":"89851","messageId":"20080905145246.GA20537@spearce.org","threadId":"15379","inReplyTo":"20080905094746.GA26820@glandium.org","subject":"Re: How can i write a new protocol for git","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-09-05T14:52:46Z","receivedAt":"2008-09-05T14:52:46Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Mike Hommey <mh@glandium.org> wrote:\n> On Fri, Sep 05, 2008 at 05:22:57PM +0800, Sky Patrick wrote:\n> > \n> > If i want to write a new protocol for file transfer and would like to\n> > to integrate it with git. Is it possible and easy to integrate it ?\n> > Currently, i know that jgit may achieve it, but it is a Java\n> > implementation and may not work with git command line program that\n> > written in C.\n\nWriting a dumb protocol support isn't difficult in JGit due to the\nabstractions in place.  Its a little harder in C Git, unless Mike\n(or someone else) can abstract out the cURL library usage and make\nit more flexible.  Though these days cURL supports just about any\nfile transfer protocol known.\n \n> First, it would depend if you need this new protocol to be a dumb\n> protocol (like rsync and http) or \"native\" (git or ssh).\n\nWriting a smart protocol is a PITA.  Look at the smart HTTP effort\nI am trying to do.  OK, I'm not spending a whole lot of time on\nit, but its a damn difficult thing to do well, and to keep simple\nenough that it can be described and reimplemented.  Otherwise we\nhave another that-thing-before-Git on our hands.\n\n> I've been meaning to refactor the dumb protocol \"stack\" for a while, but\n> haven't gone much further than ideas in my mind (i.e. no code). I also\n> have some start of http code recfactoring, that is waiting for this dumb\n> protocol rework to be completed.\n\nYea.  One reason why I'm doing the smart HTTP effort prototype in\nJGit is because the C code structure makes this harder to implement\nwithout first going through a number of refactorings.  Though for the\nsmart HTTP stuff I really need to refactor fetch-pack/send-pack and\nupload-pack/receive-pack, not the dumb walkers.\n\n-- \nShawn.\n"},{"id":"90037","messageId":"976e6d070809071932r60ca6c50na813166feec7e153@mail.gmail.com","threadId":"15379","inReplyTo":"20080905145246.GA20537@spearce.org","subject":"Re: How can i write a new protocol for git","fromName":"Sky Patrick","fromEmail":"patricksky852@gmail.com","sentAt":"2008-09-08T02:32:16Z","receivedAt":"2008-09-08T02:32:16Z","isPatch":false,"sender":{"key":"patricksky852@gmail.com","avatar":null},"body":"Hi,\n\nThe new protocol i mean is the network transfer protocol, like rsync.\nIs the word \"dumb protocol\" you mean is the network transfer protocol\n? But seem if i just implement a new protocol using jgit but not in C\n(integrate with git core code), it may not worth because more of the\nclient using git core command line tool as git client.\n\nThank you ~\n\nRegards,\nPatrick\n\nOn Fri, Sep 5, 2008 at 10:52 PM, Shawn O. Pearce <spearce@spearce.org> wrote:\n> Mike Hommey <mh@glandium.org> wrote:\n>> On Fri, Sep 05, 2008 at 05:22:57PM +0800, Sky Patrick wrote:\n>> >\n>> > If i want to write a new protocol for file transfer and would like to\n>> > to integrate it with git. Is it possible and easy to integrate it ?\n>> > Currently, i know that jgit may achieve it, but it is a Java\n>> > implementation and may not work with git command line program that\n>> > written in C.\n>\n> Writing a dumb protocol support isn't difficult in JGit due to the\n> abstractions in place.  Its a little harder in C Git, unless Mike\n> (or someone else) can abstract out the cURL library usage and make\n> it more flexible.  Though these days cURL supports just about any\n> file transfer protocol known.\n>\n>> First, it would depend if you need this new protocol to be a dumb\n>> protocol (like rsync and http) or \"native\" (git or ssh).\n>\n> Writing a smart protocol is a PITA.  Look at the smart HTTP effort\n> I am trying to do.  OK, I'm not spending a whole lot of time on\n> it, but its a damn difficult thing to do well, and to keep simple\n> enough that it can be described and reimplemented.  Otherwise we\n> have another that-thing-before-Git on our hands.\n>\n>> I've been meaning to refactor the dumb protocol \"stack\" for a while, but\n>> haven't gone much further than ideas in my mind (i.e. no code). I also\n>> have some start of http code recfactoring, that is waiting for this dumb\n>> protocol rework to be completed.\n>\n> Yea.  One reason why I'm doing the smart HTTP effort prototype in\n> JGit is because the C code structure makes this harder to implement\n> without first going through a number of refactorings.  Though for the\n> smart HTTP stuff I really need to refactor fetch-pack/send-pack and\n> upload-pack/receive-pack, not the dumb walkers.\n>\n> --\n> Shawn.\n>\n"}]}