Re: Request for detailed documentation of git pack protocol
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Jun 3, 2009, 10:47 UTC
- Message-ID
- <m3r5y1a91m.fsf@localhost.localdomain>
- In-Reply-To
- <20090603021840.GE3042@orbis-terrarum.net>
Please try to not cull the CC list (if possible), and provide attribution for quoting.
"Robin H. Johnson" <robbat2@gentoo.org> writes:
Show 12 quoted lines
>>>>> "0008NAK\n" >>>>> >>>> What does this server response mean? That served doesn't need more >>>> info? >>>> >>> It means the server is answering a prior flush from the client, >>> and is saying "I still can't serve you, keep tell me more have". >>> >> Hmmm... the communication between server and client is not entirely >> clean. Do I understand correctly that this NAK is response to clients >> flush after all those "want" lines? And that "0009done" from client >> tells server that it should send everything it has?
Show 10 quoted lines
> Relatedly with the "done" message, I'm in the process of writing a hook > that allows the server to deny the client at this point, instead of > building and sending a pack. > > Suggestions on other modifications that might be needed to integrate. > The hook: > - takes all want/have lines as input (maybe capabilities too?) > - returns 0/1 > - on error, should also send a message to stderr, to be passed over the > wire.
I am not sure if it would be possible to fit a hook there, but perhaps it would be possible to add such `pre-upload` hook... Note that it would have to somehow work for both git:// and ssh:// protocols, and perhaps also for "dumb" protocols such as http:// (and other curl-based) and deprecated rsync://
Show 5 quoted lines
> > My intended use is to block initial clones while still allowing updates > (as long as you've got a tree at least commit X recent, I'll talk to > you). Initial and too-old clients get a message to go and download a > bundle instead.
Wouldn't it be better to make use of mirror-sync (which sadly is in planning stages only; see SoC2009Ideas page on git wiki) to redirect to some other repository to be used for cloning requests?
-- Jakub Narebski Poland ShadeHawk on #git