Re: [PATCH 2/2] Teach receive-pack how to keep pack files based on object count.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 31 Oct 2006, Shawn Pearce wrote:
> Nicolas Pitre <nico@xxxxxxx> wrote:
> > I used "pack" <tab> <sha1> so it is easy to pick out of the list of refs 
> > that usually comes over the stream in the fetch case (if I understood 
> > that part right).
> 
> I thought about using a pipe too, but in the case of receive-pack
> it looked like index-pack was sending something back to the push
> end of the connection.  I didn't dig into the code enough to see
> what that was and how to do the same in receive-pack itself.

Well, I think it goes like this:

unpack-objects (and now index-pack --stdin) reads from stdin in 4kb 
chunks.  When the pack has been entirely parsed, it is possible that the 
4kb chunk contains data from the stream past the actual pack data which 
is why the remaining of the buffer is flushed out to stdout for the next 
tool in the chain to pick up.

So if you use a pipe with index-pack to retrieve the pack name, you also 
must consume all extra data from it and pass it on as well.


Nicolas
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]