git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "McMullan, Jason" <jason.mcmullan@timesys.com>
To: "Git Mailing List" <git@vger.kernel.org>
Subject: cg-push protocol proposal
Date: Thu, 02 Jun 2005 08:54:42 -0400
Date: Thu, 2 Jun 2005 08:47:55 -0400	[thread overview]
Message-ID: <1117716883.32257.42.camel@jmcmullan.timesys> (raw)

[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]

I'd like to propose the following protocol for 'pushes'. Assume that a
'git-daemon' is the 'server', and is talking on stdin/stdout.

Each command is an ascii string, followed by a LF (\n)

Request current head ID:

	  head <head-name>\n

	Responses:

	  head <head-name> <sha1>\n

	  error <head-name> <hex-code> <error-string>\n

Request a SHA1 blob from the server

	  send <sha1>\n

	Responses:

	  send <sha1> <hex-size>\n<bytes...>

	  error <sha1> <hex-code> <error-string>\n


Update head ID to a SHA1 (the SHA1 may already be in the server's DB)

	  head <head-name> <old-sha1> <sha1>\n

1)	Response if <head-name> is now <sha1>:

	  head <head-name> <sha1>\n

	Response if error, or head locked by someone else updating:

	  error <head-name> <hex-code> <error-string>\n

	Response if <sha1> is not in the database:

	  send <sha1>\n		- Server needs the blob

2)	Client response if 'send' is returned:
 
	  send <sha1> <hex-size>\n<bytes...>

3)	Response if more objects are needed 
          (ie you sent a commit or tree object)

	  send <new-sha1>\n	- Server needs blob

	  Remember the SHA1 you sent, 'call' step 2) with new-sha1 
	  Goto 3)

	Response if send succeeded:

	  exists <sha1>\n

	Response if send failed:

	  error <sha1> <hex-code> <error-string>\n

TODO: Tags
	


-- 
Jason McMullan <jason.mcmullan@timesys.com>
TimeSys Corporation


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2005-06-02 12:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-02 12:54 McMullan, Jason [this message]
2005-06-02 15:00 ` cg-push protocol proposal [update] McMullan, Jason

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=1117716883.32257.42.camel@jmcmullan.timesys \
    --to=jason.mcmullan@timesys.com \
    --cc=git@vger.kernel.org \
    /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).