git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Tom Werner <pubsub@rubyisawesome.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: git protocol specification
Date: Thu, 10 Jul 2008 02:32:55 +0000	[thread overview]
Message-ID: <20080710023255.GA8061@spearce.org> (raw)
In-Reply-To: <48750231.4020805@rubyisawesome.com>

Tom Werner <pubsub@rubyisawesome.com> 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. I've reverse engineered it but  
> have come across some points that seem inconsistent. Before I dig into  
> the C code in earnest I wanted to see if there's anything like spec  
> document for the system. Thanks!

I'm curious, are you planning on implementing git-upload-pack and
git-receive-pack in Erlang as well?  Or are you just doing the
git-daemon frontend and spawn the C git binaries as port processes?

git-receive-pack isn't too much trouble, the protocol on the server
side without the tell-me-more is fairly simple to implement, once
you have something like index-pack or unpack-objects implemented.
But that is somewhat non-trivial to do.

git-upload-pack is much more complex on the server side as you
must actually create the packfile, which means you also need to
compute the set of objects the client is missing, as well as tell
the client when you have enough "have" lines in order to compute
the smallest reasonable pack possible for the data transfer.

I know Erlang is really good at protocol handling and binary
formatting/parsing, but I don't know if you have a good git object
navigation library available to you in Erlang.  Its been years
since I last worked with it, or was involved in its community...  ;-)

-- 
Shawn.

      parent reply	other threads:[~2008-07-10  2:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-09 18:23 git protocol specification Tom Werner
2008-07-09 18:45 ` Johannes Schindelin
2008-07-10  1:47   ` Shawn O. Pearce
2008-07-10  2:32 ` Shawn O. Pearce [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080710023255.GA8061@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=pubsub@rubyisawesome.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).