From: Nicolas Pitre Date: Wed, 18 Oct 2006 23:18:58 GMT Subject: Re: [ANNOUNCE] Example Cogito Addon - cogito-bundle Message-ID: In-Reply-To: On Wed, 18 Oct 2006, Linus Torvalds wrote: > > > On Wed, 18 Oct 2006, Junio C Hamano wrote: > > > > It should not be hard to write another program that generates a > > packfile like pack-object does but taking a thin pack as its > > input. Then receive-pack can drive it instead of > > unpack-objects. > > Give me half an hour. It should be trivial to make "unpack-objects" write > the "unpacked" objects into a pack-file instead. If you use builtin-unpack-objects.c from next, you'll be able to generate the pack index pretty easily as well, as all the needed info is stored in the obj_list array. Just need to append objects remaining on the delta_list array to the end of the pack, sort the obj_list by sha1 and write the index. Pretty trivial indeed. Nicolas