git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Johannes SchindelinNext: Shawn O. Pearce
Message 3 of 4 in “git protocol specification”
  1. Tom WernerJul 9, 2008
  2. Johannes SchindelinJul 9, 2008
  3. Shawn O. PearceJul 10, 2008
  4. Shawn O. PearceJul 10, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.