{"thread":{"id":"807","subject":"cg-push protocol proposal","startedAt":"2005-06-02T12:54:42Z","lastAt":"2005-06-02T15:00:28Z","messageCount":2,"participants":["McMullan, Jason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"4412","messageId":"1117716883.32257.42.camel@jmcmullan.timesys","threadId":"807","inReplyTo":null,"subject":"cg-push protocol proposal","fromName":"McMullan, Jason","fromEmail":"jason.mcmullan@timesys.com","sentAt":"2005-06-02T12:54:42Z","receivedAt":"2005-06-02T12:54:42Z","isPatch":false,"sender":{"key":"jason.mcmullan@timesys.com","avatar":null},"body":"I'd like to propose the following protocol for 'pushes'. Assume that a\n'git-daemon' is the 'server', and is talking on stdin/stdout.\n\nEach command is an ascii string, followed by a LF (\\n)\n\nRequest current head ID:\n\n\t  head <head-name>\\n\n\n\tResponses:\n\n\t  head <head-name> <sha1>\\n\n\n\t  error <head-name> <hex-code> <error-string>\\n\n\nRequest a SHA1 blob from the server\n\n\t  send <sha1>\\n\n\n\tResponses:\n\n\t  send <sha1> <hex-size>\\n<bytes...>\n\n\t  error <sha1> <hex-code> <error-string>\\n\n\n\nUpdate head ID to a SHA1 (the SHA1 may already be in the server's DB)\n\n\t  head <head-name> <old-sha1> <sha1>\\n\n\n1)\tResponse if <head-name> is now <sha1>:\n\n\t  head <head-name> <sha1>\\n\n\n\tResponse if error, or head locked by someone else updating:\n\n\t  error <head-name> <hex-code> <error-string>\\n\n\n\tResponse if <sha1> is not in the database:\n\n\t  send <sha1>\\n\t\t- Server needs the blob\n\n2)\tClient response if 'send' is returned:\n \n\t  send <sha1> <hex-size>\\n<bytes...>\n\n3)\tResponse if more objects are needed \n          (ie you sent a commit or tree object)\n\n\t  send <new-sha1>\\n\t- Server needs blob\n\n\t  Remember the SHA1 you sent, 'call' step 2) with new-sha1 \n\t  Goto 3)\n\n\tResponse if send succeeded:\n\n\t  exists <sha1>\\n\n\n\tResponse if send failed:\n\n\t  error <sha1> <hex-code> <error-string>\\n\n\nTODO: Tags\n\t\n\n\n-- \nJason McMullan <jason.mcmullan@timesys.com>\nTimeSys Corporation\n\n"},{"id":"4420","messageId":"1117724429.32257.46.camel@jmcmullan.timesys","threadId":"807","inReplyTo":"1117716883.32257.42.camel@jmcmullan.timesys","subject":"Re: cg-push protocol proposal [update]","fromName":"McMullan, Jason","fromEmail":"jason.mcmullan@timesys.com","sentAt":"2005-06-02T15:00:28Z","receivedAt":"2005-06-02T15:00:28Z","isPatch":false,"sender":{"key":"jason.mcmullan@timesys.com","avatar":null},"body":"On Thu, 2005-06-02 at 08:47 -0400, McMullan, Jason wrote:\nI'd like to propose the following protocol for 'pushes'. Assume that a\n'git-daemon' is the 'server', and is talking on stdin/stdout.\n\n\nIf you want to only do cmp-xchg style head updates, just 'send' the\ncommit object first (the protocol will request any missing pieces),\nthen do the 'head <head-id> <old-sha1> <new-sha1>'. \n\n\n\n-- \nJason McMullan <jason.mcmullan@timesys.com>\nTimeSys Corporation\n\n"}]}