Re: git protocol specification
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jul 10, 2008, 01:47 UTC
- Message-ID
- <20080710014750.GA7714@spearce.org>
- In-Reply-To
- <alpine.DEB.1.00.0807092044120.4010@eeepc-johanness>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 7 quoted lines
> On Wed, 9 Jul 2008, Tom Werner wrote: > > > I'm working on a flexible Erlang replacement for git-daemon and would > > like to know if there is a specification available for the protocol that > > git-upload-pack and git-receive-pack use. > > How about Documentation/technical/pack-protocol.txt?
You may also want to look at jgit's source code. Its a cleaner implementation of the protocol in 100% Java. Not something you would want to try and call directly from in Erlang, but it may be easier to follow.
http://repo.or.cz/w/egit.git/
Look inside of the org.spearce.jgit/src/org/spearce/jgit/transport package. In particular the client side of the protocol for git:// is in the TransportGitAnon class as two inner subclasses, one for fetch ('git-upload-pack') and another for push ('git-receive-pack').
-- Shawn.