Re: [PATCH 3/6] introduce pack metadata cache files

2013-01-29 Thread Jeff King
On Wed, Jan 30, 2013 at 08:30:57AM +0700, Nguyen Thai Ngoc Duy wrote: > On Tue, Jan 29, 2013 at 4:15 PM, Jeff King wrote: > > +static void write_meta_header(struct metapack_writer *mw, const char *id, > > + uint32_t version) > > +{ > > + version = htonl(version);

Re: [PATCH 3/6] introduce pack metadata cache files

2013-01-29 Thread Jeff King
On Tue, Jan 29, 2013 at 09:35:12AM -0800, Junio C Hamano wrote: > Jeff King writes: > > > +static void write_meta_header(struct metapack_writer *mw, const char *id, > > + uint32_t version) > > +{ > > + version = htonl(version); > > + > > + sha1write(mw->out, "META", 4

Re: [PATCH 3/6] introduce pack metadata cache files

2013-01-29 Thread Duy Nguyen
On Tue, Jan 29, 2013 at 4:15 PM, Jeff King wrote: > +static void write_meta_header(struct metapack_writer *mw, const char *id, > + uint32_t version) > +{ > + version = htonl(version); > + > + sha1write(mw->out, "META", 4); > + sha1write(mw->out, "\0\0\

Re: [PATCH 3/6] introduce pack metadata cache files

2013-01-29 Thread Junio C Hamano
Jeff King writes: > +static void write_meta_header(struct metapack_writer *mw, const char *id, > + uint32_t version) > +{ > + version = htonl(version); > + > + sha1write(mw->out, "META", 4); > + sha1write(mw->out, "\0\0\0\1", 4); > + sha1write(mw->out, mw

[PATCH 3/6] introduce pack metadata cache files

2013-01-29 Thread Jeff King
The on-disk packfile format is nicely compact, but it does not always provide the fastest format for looking up information. This patch introduces the concept of "metapacks", optional metadata files which can live alongside packs and represent their data in different ways. This can allow space-time